Documentation ¶
Index ¶
- Variables
- func CreateName[T any](ctx context.Context, c *Client, name string, obj *T) (*T, error)
- func DeleteName[T any](ctx context.Context, c *Client, name, id string, opts *UpdateOpts[T]) error
- func FindName[T any](ctx context.Context, c *Client, name, shortID string) (*T, error)
- func GetName[T any](ctx context.Context, c *Client, name, id string, opts *GetOpts[T]) (*T, error)
- func ListName[T any](ctx context.Context, c *Client, name string, opts *ListOpts[T]) ([]*T, error)
- func ReplaceName[T any](ctx context.Context, c *Client, name, id string, obj *T, opts *UpdateOpts[T]) (*T, error)
- func UpdateName[T any](ctx context.Context, c *Client, name, id string, obj *T, opts *UpdateOpts[T]) (*T, error)
- type Client
- func (c *Client) CreateShardServerConfig(ctx context.Context, obj *ShardServerConfig) (*ShardServerConfig, error)
- func (c *Client) CreateTask(ctx context.Context, obj *Task) (*Task, error)
- func (c *Client) CreateToken(ctx context.Context, obj *Token) (*Token, error)
- func (c *Client) CreateUser(ctx context.Context, obj *User) (*User, error)
- func (c *Client) DebugInfo(ctx context.Context) (map[string]any, error)
- func (c *Client) DeleteShardServerConfig(ctx context.Context, id string, opts *UpdateOpts[ShardServerConfig]) error
- func (c *Client) DeleteTask(ctx context.Context, id string, opts *UpdateOpts[Task]) error
- func (c *Client) DeleteToken(ctx context.Context, id string, opts *UpdateOpts[Token]) error
- func (c *Client) DeleteUser(ctx context.Context, id string, opts *UpdateOpts[User]) error
- func (c *Client) FindShardServerConfig(ctx context.Context, shortID string) (*ShardServerConfig, error)
- func (c *Client) FindTask(ctx context.Context, shortID string) (*Task, error)
- func (c *Client) FindToken(ctx context.Context, shortID string) (*Token, error)
- func (c *Client) FindUser(ctx context.Context, shortID string) (*User, error)
- func (c *Client) GetShardServerConfig(ctx context.Context, id string, opts *GetOpts[ShardServerConfig]) (*ShardServerConfig, error)
- func (c *Client) GetTask(ctx context.Context, id string, opts *GetOpts[Task]) (*Task, error)
- func (c *Client) GetToken(ctx context.Context, id string, opts *GetOpts[Token]) (*Token, error)
- func (c *Client) GetUser(ctx context.Context, id string, opts *GetOpts[User]) (*User, error)
- func (c *Client) GoClient(ctx context.Context) (string, error)
- func (c *Client) ListShardServerConfig(ctx context.Context, opts *ListOpts[ShardServerConfig]) ([]*ShardServerConfig, error)
- func (c *Client) ListTask(ctx context.Context, opts *ListOpts[Task]) ([]*Task, error)
- func (c *Client) ListToken(ctx context.Context, opts *ListOpts[Token]) ([]*Token, error)
- func (c *Client) ListUser(ctx context.Context, opts *ListOpts[User]) ([]*User, error)
- func (c *Client) OpenAPI(ctx context.Context) (map[string]any, error)
- func (c *Client) ReplaceShardServerConfig(ctx context.Context, id string, obj *ShardServerConfig, ...) (*ShardServerConfig, error)
- func (c *Client) ReplaceTask(ctx context.Context, id string, obj *Task, opts *UpdateOpts[Task]) (*Task, error)
- func (c *Client) ReplaceToken(ctx context.Context, id string, obj *Token, opts *UpdateOpts[Token]) (*Token, error)
- func (c *Client) ReplaceUser(ctx context.Context, id string, obj *User, opts *UpdateOpts[User]) (*User, error)
- func (c *Client) ResetAuth() *Client
- func (c *Client) SetAuthToken(token string) *Client
- func (c *Client) SetBaseURL(baseURL string) *Client
- func (c *Client) SetBasicAuth(user, pass string) *Client
- func (c *Client) SetCloseConnection(cl bool) *Client
- func (c *Client) SetDebug(debug bool) *Client
- func (c *Client) SetHeader(name, value string) *Client
- func (c *Client) SetTLSClientConfig(cfg *tls.Config) *Client
- func (c *Client) StreamGetShardServerConfig(ctx context.Context, id string, opts *GetOpts[ShardServerConfig]) (*GetStream[ShardServerConfig], error)
- func (c *Client) StreamGetTask(ctx context.Context, id string, opts *GetOpts[Task]) (*GetStream[Task], error)
- func (c *Client) StreamGetToken(ctx context.Context, id string, opts *GetOpts[Token]) (*GetStream[Token], error)
- func (c *Client) StreamGetUser(ctx context.Context, id string, opts *GetOpts[User]) (*GetStream[User], error)
- func (c *Client) StreamListShardServerConfig(ctx context.Context, opts *ListOpts[ShardServerConfig]) (*ListStream[ShardServerConfig], error)
- func (c *Client) StreamListTask(ctx context.Context, opts *ListOpts[Task]) (*ListStream[Task], error)
- func (c *Client) StreamListToken(ctx context.Context, opts *ListOpts[Token]) (*ListStream[Token], error)
- func (c *Client) StreamListUser(ctx context.Context, opts *ListOpts[User]) (*ListStream[User], error)
- func (c *Client) TSClient(ctx context.Context) (string, error)
- func (c *Client) UpdateShardServerConfig(ctx context.Context, id string, obj *ShardServerConfig, ...) (*ShardServerConfig, error)
- func (c *Client) UpdateTask(ctx context.Context, id string, obj *Task, opts *UpdateOpts[Task]) (*Task, error)
- func (c *Client) UpdateToken(ctx context.Context, id string, obj *Token, opts *UpdateOpts[Token]) (*Token, error)
- func (c *Client) UpdateUser(ctx context.Context, id string, obj *User, opts *UpdateOpts[User]) (*User, error)
- type Config
- type Filter
- type GetOpts
- type GetStream
- type GetUserPassFunc
- type ListOpts
- type ListStream
- type ShardServerConfig
- type Task
- type Token
- type UpdateOpts
- type User
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateName ¶
func DeleteName ¶
func ReplaceName ¶
func UpdateName ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientDirect ¶
func (*Client) CreateShardServerConfig ¶
func (c *Client) CreateShardServerConfig(ctx context.Context, obj *ShardServerConfig) (*ShardServerConfig, error)
func (*Client) CreateTask ¶
func (*Client) CreateToken ¶
func (*Client) CreateUser ¶
func (*Client) DeleteShardServerConfig ¶
func (c *Client) DeleteShardServerConfig(ctx context.Context, id string, opts *UpdateOpts[ShardServerConfig]) error
func (*Client) DeleteTask ¶
func (*Client) DeleteToken ¶
func (*Client) DeleteUser ¶
func (*Client) FindShardServerConfig ¶
func (*Client) GetShardServerConfig ¶
func (c *Client) GetShardServerConfig(ctx context.Context, id string, opts *GetOpts[ShardServerConfig]) (*ShardServerConfig, error)
func (*Client) ListShardServerConfig ¶
func (c *Client) ListShardServerConfig(ctx context.Context, opts *ListOpts[ShardServerConfig]) ([]*ShardServerConfig, error)
func (*Client) ReplaceShardServerConfig ¶
func (c *Client) ReplaceShardServerConfig(ctx context.Context, id string, obj *ShardServerConfig, opts *UpdateOpts[ShardServerConfig]) (*ShardServerConfig, error)
func (*Client) ReplaceTask ¶
func (*Client) ReplaceToken ¶
func (*Client) ReplaceUser ¶
func (*Client) SetAuthToken ¶
func (*Client) SetBaseURL ¶
func (*Client) SetBasicAuth ¶
func (*Client) SetCloseConnection ¶
func (*Client) StreamGetShardServerConfig ¶
func (c *Client) StreamGetShardServerConfig(ctx context.Context, id string, opts *GetOpts[ShardServerConfig]) (*GetStream[ShardServerConfig], error)
func (*Client) StreamGetTask ¶
func (*Client) StreamGetToken ¶
func (*Client) StreamGetUser ¶
func (*Client) StreamListShardServerConfig ¶
func (c *Client) StreamListShardServerConfig(ctx context.Context, opts *ListOpts[ShardServerConfig]) (*ListStream[ShardServerConfig], error)
func (*Client) StreamListTask ¶
func (*Client) StreamListToken ¶
func (*Client) StreamListUser ¶
func (*Client) UpdateShardServerConfig ¶
func (c *Client) UpdateShardServerConfig(ctx context.Context, id string, obj *ShardServerConfig, opts *UpdateOpts[ShardServerConfig]) (*ShardServerConfig, error)
func (*Client) UpdateTask ¶
func (*Client) UpdateToken ¶
type GetStream ¶
type GetStream[T any] struct { // contains filtered or unexported fields }
func StreamGetName ¶
func (*GetStream[T]) LastEventReceived ¶
type GetUserPassFunc ¶
type ListStream ¶
type ListStream[T any] struct { // contains filtered or unexported fields }
func StreamListName ¶
func (*ListStream[T]) Chan ¶
func (ls *ListStream[T]) Chan() <-chan []*T
func (*ListStream[T]) Close ¶
func (ls *ListStream[T]) Close()
func (*ListStream[T]) Error ¶
func (ls *ListStream[T]) Error() error
func (*ListStream[T]) LastEventReceived ¶
func (ls *ListStream[T]) LastEventReceived() time.Time
func (*ListStream[T]) Read ¶
func (ls *ListStream[T]) Read() []*T
type ShardServerConfig ¶
type UpdateOpts ¶
type UpdateOpts[T any] struct { Prev *T }
type User ¶
type User struct { metadata.Metadata ListETag string `json:"-"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` Shard string `json:"shard,omitempty"` ServiceAdmin bool `json:"serviceAdmin,omitempty"` ReplicationClient bool `json:"replicationClient,omitempty"` }
Click to show internal directories.
Click to hide internal directories.