Documentation
¶
Index ¶
- Constants
- func SetService(svc Service)
- type CreateGraphQLOptions
- type CreateOptions
- type DecryptResponse
- type DefaultService
- func (*DefaultService) Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) ([]byte, error)
- func (*DefaultService) Decrypt(ctx context.ServiceContext, client *clients.GQLClient, token, keyBytes []byte) ([]byte, error)
- func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Token, error)
- func (*DefaultService) GetByHash(ctx context.ServiceContext, client *clients.GQLClient, hash string) (*Token, error)
- func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) ([]*Token, error)
- type GetGraphQLOptions
- type ListOptions
- type Service
- type Token
Constants ¶
View Source
const (
KEY_BYTES = 32
)
Variables ¶
This section is empty.
Functions ¶
func SetService ¶
func SetService(svc Service)
Types ¶
type CreateGraphQLOptions ¶ added in v1.1.7
type CreateOptions ¶ added in v1.1.7
type DecryptResponse ¶ added in v1.1.7
type DefaultService ¶ added in v1.1.7
type DefaultService struct{}
func (*DefaultService) Create ¶ added in v1.1.7
func (*DefaultService) Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) ([]byte, error)
func (*DefaultService) Decrypt ¶ added in v1.1.7
func (*DefaultService) Decrypt(ctx context.ServiceContext, client *clients.GQLClient, token, keyBytes []byte) ([]byte, error)
func (*DefaultService) Get ¶ added in v1.1.7
func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Token, error)
func (*DefaultService) GetByHash ¶ added in v1.1.7
func (*DefaultService) GetByHash(ctx context.ServiceContext, client *clients.GQLClient, hash string) (*Token, error)
func (*DefaultService) List ¶ added in v1.1.11
func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) ([]*Token, error)
type GetGraphQLOptions ¶ added in v1.1.7
type GetGraphQLOptions struct {
Hash string `json:"hash"`
}
type ListOptions ¶ added in v1.1.11
type ListOptions struct {
EnvID string `json:"env_id,omitempty"`
}
func (*ListOptions) MarshalJSON ¶ added in v1.1.11
func (o *ListOptions) MarshalJSON() ([]byte, error)
Custom marshaller for list options/filters.
type Service ¶
type Service interface { Create(context.ServiceContext, *clients.GQLClient, *CreateOptions) ([]byte, error) Get(context.ServiceContext, *clients.GQLClient, string) (*Token, error) GetByHash(context.ServiceContext, *clients.GQLClient, string) (*Token, error) List(context.ServiceContext, *clients.GQLClient, *ListOptions) ([]*Token, error) Decrypt(context.ServiceContext, *clients.GQLClient, []byte, []byte) ([]byte, error) }
func GetService ¶
func GetService() Service
type Token ¶ added in v1.1.7
type Token struct { ID string `json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` UserID string `json:"user_id,omitempty"` EnvID string `json:"env_id,omitempty"` Expiry time.Time `json:"expiry,omitempty"` Key string `json:"key,omitempty"` Hash string `json:"hash,omitempty"` Name string `json:"name,omitempty"` }
Click to show internal directories.
Click to hide internal directories.