Categorygithub.com/suborbital/se2-go
modulepackage
0.2.1
Repository: https://github.com/suborbital/se2-go.git
Documentation: pkg.go.dev

# README

se2-go

Go client library for the Suborbital Extension Engine (SE2)

Usage

In a Go project, run

go get github.com/suborbital/se2-go@latest

Every operation with SE2 is done with a se2.Client. Here's a simple example that fetches exisiting plugins for a user and namespace.

package main

import (
    "log"

    "github.com/suborbital/se2-go"
)

func main() {
    token, exists := os.LookupEnv("SE2_ENV_TOKEN")
    if !exists {
        log.Fatal("could not find token")
    }

    client, err := se2.NewClient(se2.LocalConfig(), token)
    if err != nil {
        log.Fatal(err)
    }

    // get a list of plugins
    plugins, err := client.UserPlugins("userID", "namespace")
    if err != nil {
        log.Fatal(err)
    }

    for _, r := range plugins {
        log.Println(r.FQMN)
    }
}

See examples folder for more.

# Packages

No description provided by the author

# Functions

Custom Configuration.
DefaultConfig takes the given host and creates a SE2 config with the K8S default ports.
LocalConfig generates a Configuration for SE2 running in docker-compose.
NewClient creates a Client with a Config.
NewLocalClient quickly sets up a Client with a LocalConfig.
NewPlugin instantiates a local v1.0.0 plugin that can be used for various calls with se2.Client.

# Structs

No description provided by the author
Client is used for interacting with the SE2 API.
Config combines the common configuration options for the three Suborbital Extension Engine APIs (Administrative, Builder, and Execution).
EditorStateResponse is a response to requests to get editorState.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TestPayload is a single test for a plugin.
No description provided by the author
No description provided by the author