adapter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessTokenIssuerSys    = pb.AccessTokenIssuer_SYS
	AccessTokenIssuerPortal = pb.AccessTokenIssuer_PORTAL
	AccessTokenIssuerClient = pb.AccessTokenIssuer_CLIENT
)
View Source
const (
	ErrParamsInvalid = errors.Error("FA_PARAMS_INVALID")
	ErrInvalidToken  = errors.Error("INVALID_TOKEN")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenIssuer

type AccessTokenIssuer = pb.AccessTokenIssuer

type Client

type Client struct {
	log.Logger
	*Options
	adapterkit.Adaptable
	// contains filtered or unexported fields
}

func New

func New(logger log.Logger, fns ...func(*Options)) *Client

func (*Client) CreateBranch

func (c *Client) CreateBranch(ctx context.Context, branchName []byte) (*pb.BranchResponse, error)

func (*Client) CreateEnv

func (c *Client) CreateEnv(ctx context.Context, branchId, envId, envName, envEncToken []byte) (*pb.EnvResponse, error)

func (*Client) DeleteBranch

func (c *Client) DeleteBranch(ctx context.Context, branchId []byte) error

func (*Client) DeleteEnv

func (c *Client) DeleteEnv(ctx context.Context, envId []byte) error

func (*Client) EvictAccessToken

func (c *Client) EvictAccessToken(ctx context.Context, token string) error

func (*Client) GenerateAccessToken

func (c *Client) GenerateAccessToken(ctx context.Context, issuer AccessTokenIssuer, subject string) ([]byte, error)

func (*Client) GetBranch

func (c *Client) GetBranch(ctx context.Context, branchId string) (*pb.BranchResponse, error)

func (*Client) GetBranchEncToken

func (c *Client) GetBranchEncToken(ctx context.Context, branchId []byte) ([]byte, error)

func (*Client) GetEnv

func (c *Client) GetEnv(ctx context.Context, envId []byte) (*pb.EnvResponse, error)

func (*Client) GetEnvEncToken

func (c *Client) GetEnvEncToken(ctx context.Context, envId []byte) ([]byte, error)

func (*Client) GetEnvsWithBranchId

func (c *Client) GetEnvsWithBranchId(ctx context.Context, branchId string) ([]*pb.EnvResponse, error)

func (*Client) GetSource

func (c *Client) GetSource(ctx context.Context, fileKey []byte) (*pb.FileSource, error)

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context, envId, appVersion []byte) (*pb.VersionResponse, error)

func (*Client) GetVersionList

func (c *Client) GetVersionList(ctx context.Context, envId []byte) ([]*pb.VersionResponse, error)

func (*Client) ReleaseVersion

func (c *Client) ReleaseVersion(ctx context.Context, params *pb.VersionReleaseRequest) error

func (*Client) UploadPkg

func (c *Client) UploadPkg(ctx context.Context, source multipart.File) (fileKey []byte, err error)

func (*Client) VerifyAccessToken

func (c *Client) VerifyAccessToken(ctx context.Context, token string) (subject []byte, err error)

func (*Client) VersionStrictCompatQuery

func (c *Client) VersionStrictCompatQuery(ctx context.Context, envId, appVersion []byte) (*pb.VersionStrictCompatQueryResponse, error)

type Options

type Options struct {
	ServerAddr string
}

Jump to

Keyboard shortcuts

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