api

package
v0.0.0-...-e608192 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2018 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package api provides common interfaces and headers

Package api is a generated protocol buffer package.

It is generated from these files:

auth.proto
request.proto
router.proto
spa.proto

It has these top-level messages:

ConfigureAuth
RequestAuthResp
RequestAuthReq
LoginReq
LoginResp
LogoutReq
LogoutResp
NewPasswordReq
NewPasswordResp
ChangePasswordReq
ChangePasswordResp
ConfigureURL
HTTPRequest
HTTPResponse
URL
StringList
KeyValueList
TLSState
NotifyReq
UpdateReq
UpdateResp
ServiceConfigEndpoint
ServiceConfig
Resource
LoginBundle
ApplicationBundle
ServiceBundle
FetchUIRequest
FetchUIResponse
FetchUIItem

Index

Constants

This section is empty.

Variables

View Source
var ConfigureAuth_AreaType_name = map[int32]string{
	0: "Unknown",
	1: "System",
	2: "User",
}
View Source
var ConfigureAuth_AreaType_value = map[string]int32{
	"Unknown": 0,
	"System":  1,
	"User":    2,
}
View Source
var LoginState_name = map[int32]string{
	0: "Missing",
	1: "Error",
	2: "None",
	3: "Granted",
	4: "U2F",
	5: "ChangePassword",
}
View Source
var LoginState_value = map[string]int32{
	"Missing":        0,
	"Error":          1,
	"None":           2,
	"Granted":        3,
	"U2F":            4,
	"ChangePassword": 5,
}
View Source
var ServiceConfigAction_name = map[int32]string{
	0: "Add",
	1: "Remove",
}
View Source
var ServiceConfigAction_value = map[string]int32{
	"Add":    0,
	"Remove": 1,
}
View Source
var UpdateAction_name = map[int32]string{
	0: "UpdateNOOP",
	1: "UpdateInsert",
	2: "UpdateAlter",
	3: "UpdateDelete",
}
View Source
var UpdateAction_value = map[string]int32{
	"UpdateNOOP":   0,
	"UpdateInsert": 1,
	"UpdateAlter":  2,
	"UpdateDelete": 3,
}

Functions

func AuthNewContext

func AuthNewContext(ctx context.Context, rs *RequestAuthResp) context.Context

AuthNewContext returns a child context with the RequestAuth as a value.

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

func RegisterHTTPServer

func RegisterHTTPServer(s *grpc.Server, srv HTTPServer)

func RegisterRouterConfigurationServer

func RegisterRouterConfigurationServer(s *grpc.Server, srv RouterConfigurationServer)

func RegisterRoutesServer

func RegisterRoutesServer(s *grpc.Server, srv RoutesServer)

func RegisterSPAServer

func RegisterSPAServer(s *grpc.Server, srv SPAServer)

Types

type ApplicationBundle

type ApplicationBundle struct {
	// Associate a login state with a single bundle.
	LoginBundle []*LoginBundle `protobuf:"bytes,5,rep,name=LoginBundle" json:"LoginBundle,omitempty"`
	// Configured resource for the authenticator.
	AuthConfiguredResource string `protobuf:"bytes,6,opt,name=AuthConfiguredResource" json:"AuthConfiguredResource,omitempty"`
	// Setup the host names to bind to.
	Host []string `protobuf:"bytes,7,rep,name=Host" json:"Host,omitempty"`
}

func (*ApplicationBundle) Descriptor

func (*ApplicationBundle) Descriptor() ([]byte, []int)

func (*ApplicationBundle) GetAuthConfiguredResource

func (m *ApplicationBundle) GetAuthConfiguredResource() string

func (*ApplicationBundle) GetHost

func (m *ApplicationBundle) GetHost() []string

func (*ApplicationBundle) GetLoginBundle

func (m *ApplicationBundle) GetLoginBundle() []*LoginBundle

func (*ApplicationBundle) ProtoMessage

func (*ApplicationBundle) ProtoMessage()

func (*ApplicationBundle) Reset

func (m *ApplicationBundle) Reset()

func (*ApplicationBundle) String

func (m *ApplicationBundle) String() string

type AuthClient

type AuthClient interface {
	// TODO: RequestAuth and Login should both take some additional features
	// about where the request is coming from (HTTPS info, remote address).
	RequestAuth(ctx context.Context, in *RequestAuthReq, opts ...grpc.CallOption) (*RequestAuthResp, error)
}

func NewAuthClient

func NewAuthClient(cc *grpc.ClientConn) AuthClient

type AuthServer

type AuthServer interface {
	// TODO: RequestAuth and Login should both take some additional features
	// about where the request is coming from (HTTPS info, remote address).
	RequestAuth(context.Context, *RequestAuthReq) (*RequestAuthResp, error)
}

type ChangePasswordReq

type ChangePasswordReq struct {
	// SessionTokenValue must be valid for the password to be changed.
	SessionTokenValue string `protobuf:"bytes,1,opt,name=SessionTokenValue" json:"SessionTokenValue,omitempty"`
	// CurrentPassword is not used if the login state is Change Password.
	// In that state it is assumed the client has just authenticated and
	// entering the current password again would be redundant.
	CurrentPassword string `protobuf:"bytes,2,opt,name=CurrentPassword" json:"CurrentPassword,omitempty"`
	// NewPassword to set. If the password is too weak it may be rejected.
	NewPassword string `protobuf:"bytes,3,opt,name=NewPassword" json:"NewPassword,omitempty"`
}

func (*ChangePasswordReq) Descriptor

func (*ChangePasswordReq) Descriptor() ([]byte, []int)

func (*ChangePasswordReq) GetCurrentPassword

func (m *ChangePasswordReq) GetCurrentPassword() string

func (*ChangePasswordReq) GetNewPassword

func (m *ChangePasswordReq) GetNewPassword() string

func (*ChangePasswordReq) GetSessionTokenValue

func (m *ChangePasswordReq) GetSessionTokenValue() string

func (*ChangePasswordReq) ProtoMessage

func (*ChangePasswordReq) ProtoMessage()

func (*ChangePasswordReq) Reset

func (m *ChangePasswordReq) Reset()

func (*ChangePasswordReq) String

func (m *ChangePasswordReq) String() string

type ChangePasswordResp

type ChangePasswordResp struct {
	// Changed is true when the password was changed.
	// If false the InvalidNewPasswordMessage text should
	// be displayed to the user.
	Changed bool `protobuf:"varint,1,opt,name=Changed" json:"Changed,omitempty"`
	// InvalidNewPasswordMessage is is set when Changed is true.
	InvalidNewPasswordMessage string `protobuf:"bytes,2,opt,name=InvalidNewPasswordMessage" json:"InvalidNewPasswordMessage,omitempty"`
}

func (*ChangePasswordResp) Descriptor

func (*ChangePasswordResp) Descriptor() ([]byte, []int)

func (*ChangePasswordResp) GetChanged

func (m *ChangePasswordResp) GetChanged() bool

func (*ChangePasswordResp) GetInvalidNewPasswordMessage

func (m *ChangePasswordResp) GetInvalidNewPasswordMessage() string

func (*ChangePasswordResp) ProtoMessage

func (*ChangePasswordResp) ProtoMessage()

func (*ChangePasswordResp) Reset

func (m *ChangePasswordResp) Reset()

func (*ChangePasswordResp) String

func (m *ChangePasswordResp) String() string

type ConfigureAuth

type ConfigureAuth struct {
	Area ConfigureAuth_AreaType `protobuf:"varint,1,opt,name=Area,enum=api.ConfigureAuth_AreaType" json:"Area,omitempty"`
	// Environment name.
	//   When AreaType=System, "QA" or "PROD".
	// /  When AreaType=User, "user-1" or "bobsmith".
	Environment string `protobuf:"bytes,2,opt,name=Environment" json:"Environment,omitempty"`
}

func (*ConfigureAuth) Decode

func (c *ConfigureAuth) Decode(b []byte) error

func (*ConfigureAuth) Descriptor

func (*ConfigureAuth) Descriptor() ([]byte, []int)

func (*ConfigureAuth) Encode

func (c *ConfigureAuth) Encode() ([]byte, error)

func (*ConfigureAuth) EncodeMust

func (c *ConfigureAuth) EncodeMust() []byte

func (*ConfigureAuth) GetArea

func (*ConfigureAuth) GetEnvironment

func (m *ConfigureAuth) GetEnvironment() string

func (*ConfigureAuth) ProtoMessage

func (*ConfigureAuth) ProtoMessage()

func (*ConfigureAuth) Reset

func (m *ConfigureAuth) Reset()

func (*ConfigureAuth) String

func (m *ConfigureAuth) String() string

type ConfigureAuth_AreaType

type ConfigureAuth_AreaType int32
const (
	ConfigureAuth_Unknown ConfigureAuth_AreaType = 0
	ConfigureAuth_System  ConfigureAuth_AreaType = 1
	ConfigureAuth_User    ConfigureAuth_AreaType = 2
)

func (ConfigureAuth_AreaType) EnumDescriptor

func (ConfigureAuth_AreaType) EnumDescriptor() ([]byte, []int)

func (ConfigureAuth_AreaType) String

func (x ConfigureAuth_AreaType) String() string

type ConfigureURL

type ConfigureURL struct {
	MapTo  string `protobuf:"bytes,1,opt,name=MapTo" json:"MapTo,omitempty"`
	Config string `protobuf:"bytes,2,opt,name=Config" json:"Config,omitempty"`
}

func (*ConfigureURL) Decode

func (c *ConfigureURL) Decode(b []byte) error

func (*ConfigureURL) Descriptor

func (*ConfigureURL) Descriptor() ([]byte, []int)

func (*ConfigureURL) Encode

func (c *ConfigureURL) Encode() ([]byte, error)

func (*ConfigureURL) EncodeMust

func (c *ConfigureURL) EncodeMust() []byte

func (*ConfigureURL) GetConfig

func (m *ConfigureURL) GetConfig() string

func (*ConfigureURL) GetMapTo

func (m *ConfigureURL) GetMapTo() string

func (*ConfigureURL) ProtoMessage

func (*ConfigureURL) ProtoMessage()

func (*ConfigureURL) Reset

func (m *ConfigureURL) Reset()

func (*ConfigureURL) String

func (m *ConfigureURL) String() string

type FetchUIItem

type FetchUIItem struct {
	Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	Body string `protobuf:"bytes,2,opt,name=Body" json:"Body,omitempty"`
}

func (*FetchUIItem) Descriptor

func (*FetchUIItem) Descriptor() ([]byte, []int)

func (*FetchUIItem) GetBody

func (m *FetchUIItem) GetBody() string

func (*FetchUIItem) GetName

func (m *FetchUIItem) GetName() string

func (*FetchUIItem) ProtoMessage

func (*FetchUIItem) ProtoMessage()

func (*FetchUIItem) Reset

func (m *FetchUIItem) Reset()

func (*FetchUIItem) String

func (m *FetchUIItem) String() string

type FetchUIRequest

type FetchUIRequest struct {
	List []string `protobuf:"bytes,1,rep,name=List" json:"List,omitempty"`
}

func (*FetchUIRequest) Descriptor

func (*FetchUIRequest) Descriptor() ([]byte, []int)

func (*FetchUIRequest) GetList

func (m *FetchUIRequest) GetList() []string

func (*FetchUIRequest) ProtoMessage

func (*FetchUIRequest) ProtoMessage()

func (*FetchUIRequest) Reset

func (m *FetchUIRequest) Reset()

func (*FetchUIRequest) String

func (m *FetchUIRequest) String() string

type FetchUIResponse

type FetchUIResponse struct {
	List []*FetchUIItem `protobuf:"bytes,1,rep,name=List" json:"List,omitempty"`
}

func (*FetchUIResponse) Descriptor

func (*FetchUIResponse) Descriptor() ([]byte, []int)

func (*FetchUIResponse) GetList

func (m *FetchUIResponse) GetList() []*FetchUIItem

func (*FetchUIResponse) ProtoMessage

func (*FetchUIResponse) ProtoMessage()

func (*FetchUIResponse) Reset

func (m *FetchUIResponse) Reset()

func (*FetchUIResponse) String

func (m *FetchUIResponse) String() string

type Form

type Form struct {
	Value url.Values
	File  map[string][]*multipart.FileHeader
}

Form is similar to multipart.Form, but Value is a url.Values for the methods defined on it.

type HTTPClient

type HTTPClient interface {
	ServeHTTP(ctx context.Context, in *HTTPRequest, opts ...grpc.CallOption) (*HTTPResponse, error)
}

func NewHTTPClient

func NewHTTPClient(cc *grpc.ClientConn) HTTPClient

type HTTPRequest

type HTTPRequest struct {
	Host string `protobuf:"bytes,1,opt,name=Host" json:"Host,omitempty"`
	// Method specifies the HTTP method (GET, POST, PUT, etc.).
	Method string `protobuf:"bytes,2,opt,name=Method" json:"Method,omitempty"`
	// URL specifies either the URI being requested.
	URL *URL `protobuf:"bytes,3,opt,name=URL" json:"URL,omitempty"`
	// The protocol version for incoming server requests.
	ProtoMajor  int32         `protobuf:"varint,4,opt,name=ProtoMajor" json:"ProtoMajor,omitempty"`
	ProtoMinor  int32         `protobuf:"varint,5,opt,name=ProtoMinor" json:"ProtoMinor,omitempty"`
	Header      *KeyValueList `protobuf:"bytes,6,opt,name=Header" json:"Header,omitempty"`
	Body        []byte        `protobuf:"bytes,7,opt,name=Body,proto3" json:"Body,omitempty"`
	ContentType string        `protobuf:"bytes,8,opt,name=ContentType" json:"ContentType,omitempty"`
	// RemoteAddr allows HTTP servers and other software to record
	// the network address that sent the request, usually for
	// logging. This field is not filled in by ReadRequest and
	// has no defined format. The HTTP server in this package
	// sets RemoteAddr to an "IP:port" address before invoking a
	// handler.
	RemoteAddr string           `protobuf:"bytes,9,opt,name=RemoteAddr" json:"RemoteAddr,omitempty"`
	TLS        *TLSState        `protobuf:"bytes,10,opt,name=TLS" json:"TLS,omitempty"`
	Auth       *RequestAuthResp `protobuf:"bytes,11,opt,name=Auth" json:"Auth,omitempty"`
	Config     *ConfigureURL    `protobuf:"bytes,12,opt,name=Config" json:"Config,omitempty"`
	Version    string           `protobuf:"bytes,13,opt,name=Version" json:"Version,omitempty"`
}

func (*HTTPRequest) Cookie

func (r *HTTPRequest) Cookie(name string) (*http.Cookie, error)

Cookie returns the named cookie provided in the request or ErrNoCookie if not found. If multiple cookies match the given name, only one cookie will be returned.

func (*HTTPRequest) Cookies

func (r *HTTPRequest) Cookies() []*http.Cookie

func (*HTTPRequest) Descriptor

func (*HTTPRequest) Descriptor() ([]byte, []int)

func (*HTTPRequest) FormValues

func (r *HTTPRequest) FormValues() (*Form, error)

func (*HTTPRequest) GetAuth

func (m *HTTPRequest) GetAuth() *RequestAuthResp

func (*HTTPRequest) GetBody

func (m *HTTPRequest) GetBody() []byte

func (*HTTPRequest) GetConfig

func (m *HTTPRequest) GetConfig() *ConfigureURL

func (*HTTPRequest) GetContentType

func (m *HTTPRequest) GetContentType() string

func (*HTTPRequest) GetHeader

func (m *HTTPRequest) GetHeader() *KeyValueList

func (*HTTPRequest) GetHost

func (m *HTTPRequest) GetHost() string

func (*HTTPRequest) GetMethod

func (m *HTTPRequest) GetMethod() string

func (*HTTPRequest) GetProtoMajor

func (m *HTTPRequest) GetProtoMajor() int32

func (*HTTPRequest) GetProtoMinor

func (m *HTTPRequest) GetProtoMinor() int32

func (*HTTPRequest) GetRemoteAddr

func (m *HTTPRequest) GetRemoteAddr() string

func (*HTTPRequest) GetTLS

func (m *HTTPRequest) GetTLS() *TLSState

func (*HTTPRequest) GetURL

func (m *HTTPRequest) GetURL() *URL

func (*HTTPRequest) GetVersion

func (m *HTTPRequest) GetVersion() string

func (*HTTPRequest) ProtoMessage

func (*HTTPRequest) ProtoMessage()

func (*HTTPRequest) Reset

func (m *HTTPRequest) Reset()

func (*HTTPRequest) String

func (m *HTTPRequest) String() string

type HTTPResponse

type HTTPResponse struct {
	Header *KeyValueList `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
	// Content type of the body.
	ContentType string `protobuf:"bytes,2,opt,name=ContentType" json:"ContentType,omitempty"`
	// Encoding of the response. Often a compression method like "gzip" or "br".
	Encoding string `protobuf:"bytes,3,opt,name=Encoding" json:"Encoding,omitempty"`
	Body     []byte `protobuf:"bytes,4,opt,name=Body,proto3" json:"Body,omitempty"`
}

func (*HTTPResponse) Descriptor

func (*HTTPResponse) Descriptor() ([]byte, []int)

func (*HTTPResponse) GetBody

func (m *HTTPResponse) GetBody() []byte

func (*HTTPResponse) GetContentType

func (m *HTTPResponse) GetContentType() string

func (*HTTPResponse) GetEncoding

func (m *HTTPResponse) GetEncoding() string

func (*HTTPResponse) GetHeader

func (m *HTTPResponse) GetHeader() *KeyValueList

func (*HTTPResponse) ProtoMessage

func (*HTTPResponse) ProtoMessage()

func (*HTTPResponse) Reset

func (m *HTTPResponse) Reset()

func (*HTTPResponse) String

func (m *HTTPResponse) String() string

type HTTPServer

type HTTPServer interface {
	ServeHTTP(context.Context, *HTTPRequest) (*HTTPResponse, error)
}

type KeyValueList

type KeyValueList struct {
	Values map[string]*StringList `` /* 132-byte string literal not displayed */
}

func NewKeyValueList

func NewKeyValueList(from map[string][]string) *KeyValueList

func (*KeyValueList) Add

func (h *KeyValueList) Add(key, value string)

func (*KeyValueList) Del

func (h *KeyValueList) Del(key string)

func (*KeyValueList) Descriptor

func (*KeyValueList) Descriptor() ([]byte, []int)

func (*KeyValueList) Get

func (h *KeyValueList) Get(key string) string

func (*KeyValueList) GetValues

func (m *KeyValueList) GetValues() map[string]*StringList

func (*KeyValueList) ProtoMessage

func (*KeyValueList) ProtoMessage()

func (*KeyValueList) Reset

func (m *KeyValueList) Reset()

func (*KeyValueList) Set

func (h *KeyValueList) Set(key, value string)

func (*KeyValueList) SetSlice

func (h *KeyValueList) SetSlice(key string, value []string)

func (*KeyValueList) String

func (m *KeyValueList) String() string

type LoginBundle

type LoginBundle struct {
	LoginState      LoginState `protobuf:"varint,1,opt,name=LoginState,enum=api.LoginState" json:"LoginState,omitempty"`
	Prefix          string     `protobuf:"bytes,2,opt,name=Prefix" json:"Prefix,omitempty"`
	ConsumeRedirect bool       `protobuf:"varint,3,opt,name=ConsumeRedirect" json:"ConsumeRedirect,omitempty"`
	Resource        string     `protobuf:"bytes,4,opt,name=Resource" json:"Resource,omitempty"`
}

func (*LoginBundle) Descriptor

func (*LoginBundle) Descriptor() ([]byte, []int)

func (*LoginBundle) GetConsumeRedirect

func (m *LoginBundle) GetConsumeRedirect() bool

func (*LoginBundle) GetLoginState

func (m *LoginBundle) GetLoginState() LoginState

func (*LoginBundle) GetPrefix

func (m *LoginBundle) GetPrefix() string

func (*LoginBundle) GetResource

func (m *LoginBundle) GetResource() string

func (*LoginBundle) ProtoMessage

func (*LoginBundle) ProtoMessage()

func (*LoginBundle) Reset

func (m *LoginBundle) Reset()

func (*LoginBundle) String

func (m *LoginBundle) String() string

type LoginReq

type LoginReq struct {
	Identity string `protobuf:"bytes,1,opt,name=Identity" json:"Identity,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=Password" json:"Password,omitempty"`
}

func (*LoginReq) Descriptor

func (*LoginReq) Descriptor() ([]byte, []int)

func (*LoginReq) GetIdentity

func (m *LoginReq) GetIdentity() string

func (*LoginReq) GetPassword

func (m *LoginReq) GetPassword() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) Reset

func (m *LoginReq) Reset()

func (*LoginReq) String

func (m *LoginReq) String() string

type LoginResp

type LoginResp struct {
	SessionTokenValue string `protobuf:"bytes,1,opt,name=SessionTokenValue" json:"SessionTokenValue,omitempty"`
}

func (*LoginResp) Descriptor

func (*LoginResp) Descriptor() ([]byte, []int)

func (*LoginResp) GetSessionTokenValue

func (m *LoginResp) GetSessionTokenValue() string

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) Reset

func (m *LoginResp) Reset()

func (*LoginResp) String

func (m *LoginResp) String() string

type LoginState

type LoginState int32
const (
	LoginState_Missing        LoginState = 0
	LoginState_Error          LoginState = 1
	LoginState_None           LoginState = 2
	LoginState_Granted        LoginState = 3
	LoginState_U2F            LoginState = 4
	LoginState_ChangePassword LoginState = 5
)

func (LoginState) EnumDescriptor

func (LoginState) EnumDescriptor() ([]byte, []int)

func (LoginState) String

func (x LoginState) String() string

type LogoutReq

type LogoutReq struct {
	// Types that are valid to be assigned to Value:
	//	*LogoutReq_SessionTokenValue
	//	*LogoutReq_Identity
	Value isLogoutReq_Value `protobuf_oneof:"Value"`
}

func (*LogoutReq) Descriptor

func (*LogoutReq) Descriptor() ([]byte, []int)

func (*LogoutReq) GetIdentity

func (m *LogoutReq) GetIdentity() string

func (*LogoutReq) GetSessionTokenValue

func (m *LogoutReq) GetSessionTokenValue() string

func (*LogoutReq) GetValue

func (m *LogoutReq) GetValue() isLogoutReq_Value

func (*LogoutReq) ProtoMessage

func (*LogoutReq) ProtoMessage()

func (*LogoutReq) Reset

func (m *LogoutReq) Reset()

func (*LogoutReq) String

func (m *LogoutReq) String() string

func (*LogoutReq) XXX_OneofFuncs

func (*LogoutReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type LogoutReq_Identity

type LogoutReq_Identity struct {
	Identity string `protobuf:"bytes,2,opt,name=Identity,oneof"`
}

type LogoutReq_SessionTokenValue

type LogoutReq_SessionTokenValue struct {
	SessionTokenValue string `protobuf:"bytes,1,opt,name=SessionTokenValue,oneof"`
}

type LogoutResp

type LogoutResp struct {
}

func (*LogoutResp) Descriptor

func (*LogoutResp) Descriptor() ([]byte, []int)

func (*LogoutResp) ProtoMessage

func (*LogoutResp) ProtoMessage()

func (*LogoutResp) Reset

func (m *LogoutResp) Reset()

func (*LogoutResp) String

func (m *LogoutResp) String() string

type NewPasswordReq

type NewPasswordReq struct {
	Identity string `protobuf:"bytes,1,opt,name=Identity" json:"Identity,omitempty"`
}

func (*NewPasswordReq) Descriptor

func (*NewPasswordReq) Descriptor() ([]byte, []int)

func (*NewPasswordReq) GetIdentity

func (m *NewPasswordReq) GetIdentity() string

func (*NewPasswordReq) ProtoMessage

func (*NewPasswordReq) ProtoMessage()

func (*NewPasswordReq) Reset

func (m *NewPasswordReq) Reset()

func (*NewPasswordReq) String

func (m *NewPasswordReq) String() string

type NewPasswordResp

type NewPasswordResp struct {
}

func (*NewPasswordResp) Descriptor

func (*NewPasswordResp) Descriptor() ([]byte, []int)

func (*NewPasswordResp) ProtoMessage

func (*NewPasswordResp) ProtoMessage()

func (*NewPasswordResp) Reset

func (m *NewPasswordResp) Reset()

func (*NewPasswordResp) String

func (m *NewPasswordResp) String() string

type NotifyReq

type NotifyReq struct {
	ServiceAddress string `protobuf:"bytes,1,opt,name=ServiceAddress" json:"ServiceAddress,omitempty"`
}

func (*NotifyReq) Descriptor

func (*NotifyReq) Descriptor() ([]byte, []int)

func (*NotifyReq) GetServiceAddress

func (m *NotifyReq) GetServiceAddress() string

func (*NotifyReq) ProtoMessage

func (*NotifyReq) ProtoMessage()

func (*NotifyReq) Reset

func (m *NotifyReq) Reset()

func (*NotifyReq) String

func (m *NotifyReq) String() string

type RequestAuthReq

type RequestAuthReq struct {
	Token         string         `protobuf:"bytes,1,opt,name=Token" json:"Token,omitempty"`
	Configuration *ConfigureAuth `protobuf:"bytes,2,opt,name=Configuration" json:"Configuration,omitempty"`
}

func (*RequestAuthReq) Descriptor

func (*RequestAuthReq) Descriptor() ([]byte, []int)

func (*RequestAuthReq) GetConfiguration

func (m *RequestAuthReq) GetConfiguration() *ConfigureAuth

func (*RequestAuthReq) GetToken

func (m *RequestAuthReq) GetToken() string

func (*RequestAuthReq) ProtoMessage

func (*RequestAuthReq) ProtoMessage()

func (*RequestAuthReq) Reset

func (m *RequestAuthReq) Reset()

func (*RequestAuthReq) String

func (m *RequestAuthReq) String() string

type RequestAuthResp

type RequestAuthResp struct {
	LoginState    LoginState                 `protobuf:"varint,1,opt,name=LoginState,enum=api.LoginState" json:"LoginState,omitempty"`
	ID            int64                      `protobuf:"varint,2,opt,name=ID" json:"ID,omitempty"`
	Identity      string                     `protobuf:"bytes,3,opt,name=Identity" json:"Identity,omitempty"`
	Roles         []int64                    `protobuf:"varint,4,rep,packed,name=Roles" json:"Roles,omitempty"`
	ValidUntil    *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=ValidUntil" json:"ValidUntil,omitempty"`
	ElevatedUntil *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=ElevatedUntil" json:"ElevatedUntil,omitempty"`
	GivenName     string                     `protobuf:"bytes,7,opt,name=GivenName" json:"GivenName,omitempty"`
	FamilyName    string                     `protobuf:"bytes,8,opt,name=FamilyName" json:"FamilyName,omitempty"`
	Email         string                     `protobuf:"bytes,9,opt,name=Email" json:"Email,omitempty"`
	TokenKey      string                     `protobuf:"bytes,10,opt,name=TokenKey" json:"TokenKey,omitempty"`
	Secondary     *RequestAuthResp           `protobuf:"bytes,11,opt,name=Secondary" json:"Secondary,omitempty"`
}

func AuthFromContext

func AuthFromContext(ctx context.Context) (rs *RequestAuthResp, found bool)

AuthFromContext returns the RequestAuth found in the context values if found.

func (*RequestAuthResp) Descriptor

func (*RequestAuthResp) Descriptor() ([]byte, []int)

func (*RequestAuthResp) GetElevatedUntil

func (m *RequestAuthResp) GetElevatedUntil() *google_protobuf.Timestamp

func (*RequestAuthResp) GetEmail

func (m *RequestAuthResp) GetEmail() string

func (*RequestAuthResp) GetFamilyName

func (m *RequestAuthResp) GetFamilyName() string

func (*RequestAuthResp) GetGivenName

func (m *RequestAuthResp) GetGivenName() string

func (*RequestAuthResp) GetID

func (m *RequestAuthResp) GetID() int64

func (*RequestAuthResp) GetIdentity

func (m *RequestAuthResp) GetIdentity() string

func (*RequestAuthResp) GetLoginState

func (m *RequestAuthResp) GetLoginState() LoginState

func (*RequestAuthResp) GetRoles

func (m *RequestAuthResp) GetRoles() []int64

func (*RequestAuthResp) GetSecondary

func (m *RequestAuthResp) GetSecondary() *RequestAuthResp

func (*RequestAuthResp) GetTokenKey

func (m *RequestAuthResp) GetTokenKey() string

func (*RequestAuthResp) GetValidUntil

func (m *RequestAuthResp) GetValidUntil() *google_protobuf.Timestamp

func (*RequestAuthResp) ProtoMessage

func (*RequestAuthResp) ProtoMessage()

func (*RequestAuthResp) Reset

func (m *RequestAuthResp) Reset()

func (*RequestAuthResp) String

func (m *RequestAuthResp) String() string

type Resource

type Resource struct {
	Name          string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	Parent        string `protobuf:"bytes,2,opt,name=Parent" json:"Parent,omitempty"`
	Type          string `protobuf:"bytes,3,opt,name=Type" json:"Type,omitempty"`
	Consume       string `protobuf:"bytes,4,opt,name=Consume" json:"Consume,omitempty"`
	Configuration []byte `protobuf:"bytes,5,opt,name=Configuration,proto3" json:"Configuration,omitempty"`
	// Include list of other resources this bundle should include.
	Include []string `protobuf:"bytes,6,rep,name=Include" json:"Include,omitempty"`
}

func (*Resource) Descriptor

func (*Resource) Descriptor() ([]byte, []int)

func (*Resource) GetConfiguration

func (m *Resource) GetConfiguration() []byte

func (*Resource) GetConsume

func (m *Resource) GetConsume() string

func (*Resource) GetInclude

func (m *Resource) GetInclude() []string

func (*Resource) GetName

func (m *Resource) GetName() string

func (*Resource) GetParent

func (m *Resource) GetParent() string

func (*Resource) GetType

func (m *Resource) GetType() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) Reset

func (m *Resource) Reset()

func (*Resource) String

func (m *Resource) String() string

type ResourceType

type ResourceType = string
const (
	ResourceNone    ResourceType = ""
	ResourceAuth    ResourceType = "solidcoredata.org/resource/auth"
	ResourceURL     ResourceType = "solidcoredata.org/resource/url"
	ResourceSPACode ResourceType = "solidcoredata.org/resource/spa-code"
	ResourceQuery   ResourceType = "solidcoredata.org/resource/query"
)

type RouterConfigurationClient

type RouterConfigurationClient interface {
	Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
	Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*UpdateResp, error)
}

func NewRouterConfigurationClient

func NewRouterConfigurationClient(cc *grpc.ClientConn) RouterConfigurationClient

type RouterConfigurationServer

type RouterConfigurationServer interface {
	Notify(context.Context, *NotifyReq) (*google_protobuf1.Empty, error)
	Update(context.Context, *UpdateReq) (*UpdateResp, error)
}

type RoutesClient

type RoutesClient interface {
	UpdateServiceBundle(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (Routes_UpdateServiceBundleClient, error)
	// Update connected services information, such as other service locations and SPA code and configs.
	UpdateServiceConfig(ctx context.Context, in *ServiceConfig, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
}

func NewRoutesClient

func NewRoutesClient(cc *grpc.ClientConn) RoutesClient

type RoutesServer

type RoutesServer interface {
	UpdateServiceBundle(*google_protobuf1.Empty, Routes_UpdateServiceBundleServer) error
	// Update connected services information, such as other service locations and SPA code and configs.
	UpdateServiceConfig(context.Context, *ServiceConfig) (*google_protobuf1.Empty, error)
}

type Routes_UpdateServiceBundleClient

type Routes_UpdateServiceBundleClient interface {
	Recv() (*ServiceBundle, error)
	grpc.ClientStream
}

type Routes_UpdateServiceBundleServer

type Routes_UpdateServiceBundleServer interface {
	Send(*ServiceBundle) error
	grpc.ServerStream
}

type SPAClient

type SPAClient interface {
	// TODO: RequestAuth and Login should both take some additional features
	// about where the request is coming from (HTTPS info, remote address).
	FetchUI(ctx context.Context, in *FetchUIRequest, opts ...grpc.CallOption) (*FetchUIResponse, error)
}

func NewSPAClient

func NewSPAClient(cc *grpc.ClientConn) SPAClient

type SPAServer

type SPAServer interface {
	// TODO: RequestAuth and Login should both take some additional features
	// about where the request is coming from (HTTPS info, remote address).
	FetchUI(context.Context, *FetchUIRequest) (*FetchUIResponse, error)
}

type ServiceBundle

type ServiceBundle struct {
	// Name is the base name for this service.
	// If something references  "solidcoredata.org/example-1/app" and the base
	// name is "solidcoredata.org/example-1", then the component name that is sent is "app".
	// "solidcoredata.org/example-1" or "solidcoredata.org/library-1".
	Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	// Resources with potential and configured resources.
	// Also define bundled resources together.
	Resource []*Resource `protobuf:"bytes,2,rep,name=Resource" json:"Resource,omitempty"`
	// Bundle Login bundles together with an auth configured resource and
	// host name list to define an application that can be served.
	Application []*ApplicationBundle `protobuf:"bytes,5,rep,name=Application" json:"Application,omitempty"`
}

func (*ServiceBundle) Descriptor

func (*ServiceBundle) Descriptor() ([]byte, []int)

func (*ServiceBundle) GetApplication

func (m *ServiceBundle) GetApplication() []*ApplicationBundle

func (*ServiceBundle) GetName

func (m *ServiceBundle) GetName() string

func (*ServiceBundle) GetResource

func (m *ServiceBundle) GetResource() []*Resource

func (*ServiceBundle) ProtoMessage

func (*ServiceBundle) ProtoMessage()

func (*ServiceBundle) Reset

func (m *ServiceBundle) Reset()

func (*ServiceBundle) String

func (m *ServiceBundle) String() string

type ServiceConfig

type ServiceConfig struct {
	Version string                   `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"`
	Action  ServiceConfigAction      `protobuf:"varint,2,opt,name=Action,enum=api.ServiceConfigAction" json:"Action,omitempty"`
	List    []*ServiceConfigEndpoint `protobuf:"bytes,3,rep,name=List" json:"List,omitempty"`
}

func (*ServiceConfig) Descriptor

func (*ServiceConfig) Descriptor() ([]byte, []int)

func (*ServiceConfig) GetAction

func (m *ServiceConfig) GetAction() ServiceConfigAction

func (*ServiceConfig) GetList

func (m *ServiceConfig) GetList() []*ServiceConfigEndpoint

func (*ServiceConfig) GetVersion

func (m *ServiceConfig) GetVersion() string

func (*ServiceConfig) ProtoMessage

func (*ServiceConfig) ProtoMessage()

func (*ServiceConfig) Reset

func (m *ServiceConfig) Reset()

func (*ServiceConfig) String

func (m *ServiceConfig) String() string

type ServiceConfigAction

type ServiceConfigAction int32
const (
	ServiceConfigAction_Add    ServiceConfigAction = 0
	ServiceConfigAction_Remove ServiceConfigAction = 1
)

func (ServiceConfigAction) EnumDescriptor

func (ServiceConfigAction) EnumDescriptor() ([]byte, []int)

func (ServiceConfigAction) String

func (x ServiceConfigAction) String() string

type ServiceConfigEndpoint

type ServiceConfigEndpoint struct {
	Name     string      `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	Endpoint string      `protobuf:"bytes,2,opt,name=Endpoint" json:"Endpoint,omitempty"`
	Resource []*Resource `protobuf:"bytes,3,rep,name=Resource" json:"Resource,omitempty"`
}

func (*ServiceConfigEndpoint) Descriptor

func (*ServiceConfigEndpoint) Descriptor() ([]byte, []int)

func (*ServiceConfigEndpoint) GetEndpoint

func (m *ServiceConfigEndpoint) GetEndpoint() string

func (*ServiceConfigEndpoint) GetName

func (m *ServiceConfigEndpoint) GetName() string

func (*ServiceConfigEndpoint) GetResource

func (m *ServiceConfigEndpoint) GetResource() []*Resource

func (*ServiceConfigEndpoint) ProtoMessage

func (*ServiceConfigEndpoint) ProtoMessage()

func (*ServiceConfigEndpoint) Reset

func (m *ServiceConfigEndpoint) Reset()

func (*ServiceConfigEndpoint) String

func (m *ServiceConfigEndpoint) String() string

type StringList

type StringList struct {
	Value []string `protobuf:"bytes,1,rep,name=Value" json:"Value,omitempty"`
}

func (*StringList) Descriptor

func (*StringList) Descriptor() ([]byte, []int)

func (*StringList) GetValue

func (m *StringList) GetValue() []string

func (*StringList) ProtoMessage

func (*StringList) ProtoMessage()

func (*StringList) Reset

func (m *StringList) Reset()

func (*StringList) String

func (m *StringList) String() string

type TLSState

type TLSState struct {
	Version           uint32 `protobuf:"varint,1,opt,name=Version" json:"Version,omitempty"`
	HandshakeComplete bool   `protobuf:"varint,2,opt,name=HandshakeComplete" json:"HandshakeComplete,omitempty"`
	DidResume         bool   `protobuf:"varint,3,opt,name=DidResume" json:"DidResume,omitempty"`
	CipherSuite       uint32 `protobuf:"varint,4,opt,name=CipherSuite" json:"CipherSuite,omitempty"`
	ServerName        string `protobuf:"bytes,5,opt,name=ServerName" json:"ServerName,omitempty"`
}

func (*TLSState) Descriptor

func (*TLSState) Descriptor() ([]byte, []int)

func (*TLSState) GetCipherSuite

func (m *TLSState) GetCipherSuite() uint32

func (*TLSState) GetDidResume

func (m *TLSState) GetDidResume() bool

func (*TLSState) GetHandshakeComplete

func (m *TLSState) GetHandshakeComplete() bool

func (*TLSState) GetServerName

func (m *TLSState) GetServerName() string

func (*TLSState) GetVersion

func (m *TLSState) GetVersion() uint32

func (*TLSState) ProtoMessage

func (*TLSState) ProtoMessage()

func (*TLSState) Reset

func (m *TLSState) Reset()

func (*TLSState) String

func (m *TLSState) String() string

type URL

type URL struct {
	Host  string        `protobuf:"bytes,1,opt,name=Host" json:"Host,omitempty"`
	Path  string        `protobuf:"bytes,2,opt,name=Path" json:"Path,omitempty"`
	Query *KeyValueList `protobuf:"bytes,3,opt,name=Query" json:"Query,omitempty"`
}

func (*URL) Descriptor

func (*URL) Descriptor() ([]byte, []int)

func (*URL) GetHost

func (m *URL) GetHost() string

func (*URL) GetPath

func (m *URL) GetPath() string

func (*URL) GetQuery

func (m *URL) GetQuery() *KeyValueList

func (*URL) ProtoMessage

func (*URL) ProtoMessage()

func (*URL) Reset

func (m *URL) Reset()

func (*URL) String

func (m *URL) String() string

type UpdateAction

type UpdateAction int32
const (
	UpdateAction_UpdateNOOP   UpdateAction = 0
	UpdateAction_UpdateInsert UpdateAction = 1
	UpdateAction_UpdateAlter  UpdateAction = 2
	UpdateAction_UpdateDelete UpdateAction = 3
)

func (UpdateAction) EnumDescriptor

func (UpdateAction) EnumDescriptor() ([]byte, []int)

func (UpdateAction) String

func (x UpdateAction) String() string

type UpdateReq

type UpdateReq struct {
	Action UpdateAction `protobuf:"varint,1,opt,name=Action,enum=api.UpdateAction" json:"Action,omitempty"`
	Bind   string       `protobuf:"bytes,2,opt,name=Bind" json:"Bind,omitempty"`
	Host   []string     `protobuf:"bytes,3,rep,name=Host" json:"Host,omitempty"`
	Bundle []string     `protobuf:"bytes,4,rep,name=Bundle" json:"Bundle,omitempty"`
}

func (*UpdateReq) Descriptor

func (*UpdateReq) Descriptor() ([]byte, []int)

func (*UpdateReq) GetAction

func (m *UpdateReq) GetAction() UpdateAction

func (*UpdateReq) GetBind

func (m *UpdateReq) GetBind() string

func (*UpdateReq) GetBundle

func (m *UpdateReq) GetBundle() []string

func (*UpdateReq) GetHost

func (m *UpdateReq) GetHost() []string

func (*UpdateReq) ProtoMessage

func (*UpdateReq) ProtoMessage()

func (*UpdateReq) Reset

func (m *UpdateReq) Reset()

func (*UpdateReq) String

func (m *UpdateReq) String() string

type UpdateResp

type UpdateResp struct {
}

func (*UpdateResp) Descriptor

func (*UpdateResp) Descriptor() ([]byte, []int)

func (*UpdateResp) ProtoMessage

func (*UpdateResp) ProtoMessage()

func (*UpdateResp) Reset

func (m *UpdateResp) Reset()

func (*UpdateResp) String

func (m *UpdateResp) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL