server

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoveHandler

type RemoveHandler func(id int)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(client *ent.Client) *Server

func (*Server) CreateToken

func (srv *Server) CreateToken(ctx context.Context, req *api.Config) (*api.Credential, error)

func (*Server) DeleteToken

func (srv *Server) DeleteToken(ctx context.Context, params api.DeleteTokenParams) error

func (*Server) GetToken

func (srv *Server) GetToken(ctx context.Context, params api.GetTokenParams) (*api.Token, error)

func (*Server) ListTokens

func (srv *Server) ListTokens(ctx context.Context) ([]api.Token, error)

func (*Server) OnRemove

func (srv *Server) OnRemove(fn RemoveHandler)

func (*Server) OnUpdate

func (srv *Server) OnUpdate(fn UpdateHandler)

func (*Server) RefreshToken

func (srv *Server) RefreshToken(ctx context.Context, params api.RefreshTokenParams) (*api.Credential, error)

func (*Server) UpdateToken

func (srv *Server) UpdateToken(ctx context.Context, req *api.Config, params api.UpdateTokenParams) error

type UpdateHandler

type UpdateHandler func(id int)

Jump to

Keyboard shortcuts

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