Documentation ¶
Index ¶
- func CreateRegistrationRecord(ctx context.Context, c registration.RegistrationClient, ...) error
- func CreateToken(ctx context.Context, c registration.RegistrationClient, ttl int) (string, error)
- func CreateWorkloads(ctx context.Context, c registration.RegistrationClient, xname string, ...) error
- func GenerateToken(w http.ResponseWriter, r *http.Request)
- func IntSliceContains(s []int, e int) bool
- func Logger(inner http.Handler, name string) http.Handler
- func NewRegistrationClient(socketPath string, ctx context.Context) (registration.RegistrationClient, error)
- func NewRouter() *mux.Router
- func RootGet(w http.ResponseWriter, r *http.Request)
- type Info
- type ProblemDetails
- type Route
- type Routes
- type Token
- type Workload
- type WorkloadSelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRegistrationRecord ¶ added in v1.0.0
func CreateRegistrationRecord(ctx context.Context, c registration.RegistrationClient, parentID, spiffeID string) error
func CreateToken ¶ added in v1.0.0
func CreateToken(ctx context.Context, c registration.RegistrationClient, ttl int) (string, error)
func CreateWorkloads ¶ added in v1.0.0
func CreateWorkloads(ctx context.Context, c registration.RegistrationClient, xname string, workloads []Workload) error
func GenerateToken ¶
func GenerateToken(w http.ResponseWriter, r *http.Request)
GenerateToken - generate new Spire Join token
func IntSliceContains ¶
IntSliceContains will check for an integer value in a slice
func NewRegistrationClient ¶
func NewRegistrationClient(socketPath string, ctx context.Context) (registration.RegistrationClient, error)
Types ¶
type Info ¶
type Info struct {
Version string `json:"version,omitempty"`
}
Info is the root info representation
type ProblemDetails ¶
type ProblemDetails struct { Title string `json:"title,omitempty"` Status int32 `json:"status,omitempty"` Detail string `json:"detail,omitempty"` }
ProblemDetails is a structure for returning an error via the api
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route is an http route
type Token ¶
type Token struct {
JoinToken string `json:"join_token,omitempty"`
}
JoinToken is Spire issued join token
type Workload ¶ added in v1.0.0
type Workload struct { SpiffeID string `yaml:"spiffeID"` Selectors []WorkloadSelector `yaml:"selectors"` Ttl int32 `yaml:"ttl,omitempty"` }
func ParseWorkloads ¶ added in v1.0.0
type WorkloadSelector ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.