api

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: GPL-3.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenType_name = map[int32]string{
		0: "HS256",
		1: "RS256",
	}
	TokenType_value = map[string]int32{
		"HS256": 0,
		"RS256": 1,
	}
)

Enum value maps for TokenType.

View Source
var File_proto_api_api_proto protoreflect.FileDescriptor
View Source
var File_proto_api_role_proto protoreflect.FileDescriptor
View Source
var File_proto_api_scope_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type API

type API struct {
	Header *header.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty" bson:"header"` // @gotags: bson:"header"
	// domain - A arbitrary domain used in the audience of issues tokens. Does not need to resolve to anything
	Audience string `protobuf:"bytes,2,opt,name=audience,proto3" json:"audience,omitempty" bson:"audience"` // @gotags: bson:"audience"
	// name - The name of the API as defined by the user
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" bson:"name"` // @gotags: bson:"name"
	// token_type - The type of tokens the API should issue
	TokenType TokenType `` // @gotags: bson:"token_type"
	/* 126-byte string literal not displayed */
	// enforce_rbac - Enforce permissions and roles for this API
	EnforceRbac bool `protobuf:"varint,5,opt,name=enforce_rbac,json=enforceRbac,proto3" json:"enforce_rbac,omitempty" bson:"enforce_rbac"` // @gotags: bson:"enforce_rbac"
	// contains filtered or unexported fields
}

API - Represents an integrators API. Primarily contains RBAC information and determines the token type

func (*API) Descriptor deprecated

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

Deprecated: Use API.ProtoReflect.Descriptor instead.

func (*API) GetAudience

func (x *API) GetAudience() string

func (*API) GetEnforceRbac

func (x *API) GetEnforceRbac() bool

func (*API) GetHeader

func (x *API) GetHeader() *header.Header

func (*API) GetName

func (x *API) GetName() string

func (*API) GetTokenType

func (x *API) GetTokenType() TokenType

func (*API) ProtoMessage

func (*API) ProtoMessage()

func (*API) ProtoReflect

func (x *API) ProtoReflect() protoreflect.Message

func (*API) Reset

func (x *API) Reset()

func (*API) String

func (x *API) String() string

type PermissionScope

type PermissionScope struct {

	// header - Shared data values used across all objects
	Header *header.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty" bson:"header"` // @gotags: bson:"header"
	// associated_api - The API this permission scope is assigned to
	AssociatedApi string `protobuf:"bytes,2,opt,name=associated_api,json=associatedApi,proto3" json:"associated_api,omitempty" bson:"associated_api"` // @gotags: bson:"associated_api"
	// key - A key for the permission scope
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty" bson:"key"` // @gotags: bson:"key"
	// value - A value for the permission scope
	Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty" bson:"value"` // @gotags: bson:"value"
	// contains filtered or unexported fields
}

PermissionScope - A structure representing a unit of permissions that can be evaluated by the API. When marshaled and returned to the user, key and value are appended together in the following format:

`key:value`

func (*PermissionScope) Descriptor deprecated

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

Deprecated: Use PermissionScope.ProtoReflect.Descriptor instead.

func (*PermissionScope) GetAssociatedApi

func (x *PermissionScope) GetAssociatedApi() string

func (*PermissionScope) GetHeader

func (x *PermissionScope) GetHeader() *header.Header

func (*PermissionScope) GetKey

func (x *PermissionScope) GetKey() string

func (*PermissionScope) GetValue

func (x *PermissionScope) GetValue() string

func (*PermissionScope) ProtoMessage

func (*PermissionScope) ProtoMessage()

func (*PermissionScope) ProtoReflect

func (x *PermissionScope) ProtoReflect() protoreflect.Message

func (*PermissionScope) Reset

func (x *PermissionScope) Reset()

func (*PermissionScope) String

func (x *PermissionScope) String() string

type Role

type Role struct {

	// header - Shared data values used across all objects
	Header *header.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty" bson:"header"` // @gotags: bson:"header"
	// name - The name of the role as defined by the user
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" bson:"name"` // @gotags: bson:"name"
	// description - The description of the role as defined by the user
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" bson:"description"` // @gotags: bson:"description"
	// scopes - A map representing the scopes assigned to this role. Key is the API id, and value is the ID of the scope
	Scopes map[string]string `` // @gotags: bson:"scopes"
	/* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Role - A container for permission scopes that can be assigned to users

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetDescription

func (x *Role) GetDescription() string

func (*Role) GetHeader

func (x *Role) GetHeader() *header.Header

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetScopes

func (x *Role) GetScopes() map[string]string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

func (x *Role) ProtoReflect() protoreflect.Message

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type TokenType

type TokenType int32

TokenType - The type of tokens the API should issue

const (
	TokenType_HS256 TokenType = 0
	TokenType_RS256 TokenType = 1
)

func (TokenType) Descriptor

func (TokenType) Descriptor() protoreflect.EnumDescriptor

func (TokenType) Enum

func (x TokenType) Enum() *TokenType

func (TokenType) EnumDescriptor deprecated

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

Deprecated: Use TokenType.Descriptor instead.

func (TokenType) Number

func (x TokenType) Number() protoreflect.EnumNumber

func (TokenType) String

func (x TokenType) String() string

func (TokenType) Type

Jump to

Keyboard shortcuts

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