Documentation
¶
Overview ¶
Package client implements the client interfaces defined in the anytype package
Index ¶
- func NewClient(options anytype.ClientOptions) anytype.Client
- type AddObjectsToListRequest
- type AuthClientImpl
- type ClientImpl
- type CreateApiKeyRequest
- type CreateChallengeRequest
- type ListContextImpl
- type MemberClientImpl
- type MemberContextImpl
- type ObjectClientImpl
- type ObjectContextImpl
- func (oc *ObjectContextImpl) Delete(ctx context.Context) (*anytype.ObjectResponse, error)
- func (oc *ObjectContextImpl) Get(ctx context.Context, opts ...anytype.GetOption) (*anytype.ObjectResponse, error)
- func (oc *ObjectContextImpl) Update(ctx context.Context, request anytype.UpdateObjectRequest) (*anytype.ObjectResponse, error)
- type ObjectListClientImpl
- type ObjectListContextImpl
- type ObjectViewClientImpl
- type PropertyContextImpl
- func (pc *PropertyContextImpl) Delete(ctx context.Context) (*anytype.PropertyResponse, error)
- func (pc *PropertyContextImpl) Get(ctx context.Context) (*anytype.PropertyResponse, error)
- func (pc *PropertyContextImpl) Tag(tagID string) anytype.TagContext
- func (pc *PropertyContextImpl) Tags() anytype.TagClient
- func (pc *PropertyContextImpl) Update(ctx context.Context, request anytype.UpdatePropertyRequest) (*anytype.PropertyResponse, error)
- type SearchClientImpl
- type SpaceClientImpl
- type SpaceContextImpl
- func (sc *SpaceContextImpl) Get(ctx context.Context) (*anytype.SpaceResponse, error)
- func (sc *SpaceContextImpl) List(listID string) anytype.ListContext
- func (sc *SpaceContextImpl) Member(memberID string) anytype.MemberContext
- func (sc *SpaceContextImpl) Members() anytype.MemberClient
- func (sc *SpaceContextImpl) Object(objectID string) anytype.ObjectContext
- func (sc *SpaceContextImpl) Objects() anytype.ObjectClient
- func (sc *SpaceContextImpl) Properties() anytype.SpacePropertyClient
- func (sc *SpaceContextImpl) Property(propertyID string) anytype.PropertyContext
- func (sc *SpaceContextImpl) Search(ctx context.Context, request anytype.SearchRequest) (*anytype.SearchResponse, error)
- func (sc *SpaceContextImpl) Type(typeID string) anytype.TypeContext
- func (sc *SpaceContextImpl) Types() anytype.TypeClient
- func (sc *SpaceContextImpl) Update(ctx context.Context, request anytype.UpdateSpaceRequest) (*anytype.SpaceResponse, error)
- type SpacePropertyClientImpl
- type TagClientImpl
- type TagContextImpl
- type TemplateClientImpl
- type TemplateContextImpl
- type TypeClientImpl
- func (tc *TypeClientImpl) Create(ctx context.Context, request anytype.CreateTypeRequest) (*anytype.TypeResponse, error)
- func (tc *TypeClientImpl) Get(ctx context.Context, typeKey string) (*anytype.Type, error)
- func (tc *TypeClientImpl) GetKeyByName(ctx context.Context, name string) (string, error)
- func (tc *TypeClientImpl) List(ctx context.Context) ([]anytype.Type, error)
- type TypeContextImpl
- func (tc *TypeContextImpl) Delete(ctx context.Context) (*anytype.TypeResponse, error)
- func (tc *TypeContextImpl) Get(ctx context.Context) (*anytype.TypeResponse, error)
- func (tc *TypeContextImpl) Template(templateID string) anytype.TemplateContext
- func (tc *TypeContextImpl) Templates() anytype.TemplateClient
- func (tc *TypeContextImpl) Update(ctx context.Context, request anytype.UpdateTypeRequest) (*anytype.TypeResponse, error)
- type ViewClientImpl
- type ViewContextImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddObjectsToListRequest ¶ added in v0.4.0
type AddObjectsToListRequest struct {
Objects []string `json:"objects"`
}
type AuthClientImpl ¶
type AuthClientImpl struct {
// contains filtered or unexported fields
}
func (*AuthClientImpl) CreateApiKey ¶ added in v0.4.0
func (ac *AuthClientImpl) CreateApiKey(ctx context.Context, challengeID string, code string) (*anytype.CreateApiKeyResponse, error)
CreateApiKey completes the authentication flow by providing a code
func (*AuthClientImpl) CreateChallenge ¶ added in v0.4.0
func (ac *AuthClientImpl) CreateChallenge(ctx context.Context, appName string) (*anytype.CreateChallengeResponse, error)
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
func (*ClientImpl) Auth ¶
func (c *ClientImpl) Auth() anytype.AuthClient
func (*ClientImpl) Search ¶
func (c *ClientImpl) Search() anytype.SearchClient
func (*ClientImpl) Space ¶
func (c *ClientImpl) Space(spaceID string) anytype.SpaceContext
func (*ClientImpl) Spaces ¶
func (c *ClientImpl) Spaces() anytype.SpaceClient
type CreateApiKeyRequest ¶ added in v0.4.0
type CreateChallengeRequest ¶ added in v0.4.0
type CreateChallengeRequest struct {
AppName string `json:"app_name"`
}
type ListContextImpl ¶
type ListContextImpl struct {
// contains filtered or unexported fields
}
func (*ListContextImpl) Object ¶
func (lc *ListContextImpl) Object(objectID string) anytype.ObjectListContext
func (*ListContextImpl) Objects ¶
func (lc *ListContextImpl) Objects() anytype.ObjectListClient
func (*ListContextImpl) View ¶
func (lc *ListContextImpl) View(viewID string) anytype.ViewContext
func (*ListContextImpl) Views ¶
func (lc *ListContextImpl) Views() anytype.ViewClient
type MemberClientImpl ¶
type MemberClientImpl struct {
// contains filtered or unexported fields
}
func (*MemberClientImpl) List ¶
func (mc *MemberClientImpl) List(ctx context.Context) (*anytype.MemberListResponse, error)
type MemberContextImpl ¶
type MemberContextImpl struct {
// contains filtered or unexported fields
}
func (*MemberContextImpl) Get ¶
func (mc *MemberContextImpl) Get(ctx context.Context) (*anytype.MemberResponse, error)
type ObjectClientImpl ¶
type ObjectClientImpl struct {
// contains filtered or unexported fields
}
func (*ObjectClientImpl) Create ¶
func (oc *ObjectClientImpl) Create(ctx context.Context, request anytype.CreateObjectRequest) (*anytype.ObjectResponse, error)
func (*ObjectClientImpl) List ¶
func (oc *ObjectClientImpl) List(ctx context.Context, opts ...anytype.ListOption) ([]anytype.Object, error)
type ObjectContextImpl ¶
type ObjectContextImpl struct {
// contains filtered or unexported fields
}
func (*ObjectContextImpl) Delete ¶
func (oc *ObjectContextImpl) Delete(ctx context.Context) (*anytype.ObjectResponse, error)
func (*ObjectContextImpl) Get ¶
func (oc *ObjectContextImpl) Get(ctx context.Context, opts ...anytype.GetOption) (*anytype.ObjectResponse, error)
func (*ObjectContextImpl) Update ¶
func (oc *ObjectContextImpl) Update(ctx context.Context, request anytype.UpdateObjectRequest) (*anytype.ObjectResponse, error)
type ObjectListClientImpl ¶
type ObjectListClientImpl struct {
// contains filtered or unexported fields
}
type ObjectListContextImpl ¶
type ObjectListContextImpl struct {
// contains filtered or unexported fields
}
type ObjectViewClientImpl ¶
type ObjectViewClientImpl struct {
// contains filtered or unexported fields
}
func (*ObjectViewClientImpl) List ¶
func (ovc *ObjectViewClientImpl) List(ctx context.Context) (*anytype.ObjectListResponse, error)
type PropertyContextImpl ¶ added in v0.53.1
type PropertyContextImpl struct {
// contains filtered or unexported fields
}
func (*PropertyContextImpl) Delete ¶ added in v0.53.1
func (pc *PropertyContextImpl) Delete(ctx context.Context) (*anytype.PropertyResponse, error)
func (*PropertyContextImpl) Get ¶ added in v0.53.1
func (pc *PropertyContextImpl) Get(ctx context.Context) (*anytype.PropertyResponse, error)
func (*PropertyContextImpl) Tag ¶ added in v0.53.1
func (pc *PropertyContextImpl) Tag(tagID string) anytype.TagContext
func (*PropertyContextImpl) Tags ¶ added in v0.53.1
func (pc *PropertyContextImpl) Tags() anytype.TagClient
func (*PropertyContextImpl) Update ¶ added in v0.53.1
func (pc *PropertyContextImpl) Update(ctx context.Context, request anytype.UpdatePropertyRequest) (*anytype.PropertyResponse, error)
type SearchClientImpl ¶
type SearchClientImpl struct {
// contains filtered or unexported fields
}
func (*SearchClientImpl) Search ¶
func (sc *SearchClientImpl) Search(ctx context.Context, request anytype.SearchRequest) (*anytype.SearchResponse, error)
Search searches for objects across all spaces
type SpaceClientImpl ¶
type SpaceClientImpl struct {
// contains filtered or unexported fields
}
func (*SpaceClientImpl) Create ¶
func (sc *SpaceClientImpl) Create(ctx context.Context, request anytype.CreateSpaceRequest) (*anytype.SpaceResponse, error)
func (*SpaceClientImpl) List ¶
func (sc *SpaceClientImpl) List(ctx context.Context) (*anytype.SpaceListResponse, error)
type SpaceContextImpl ¶
type SpaceContextImpl struct {
// contains filtered or unexported fields
}
func (*SpaceContextImpl) Get ¶
func (sc *SpaceContextImpl) Get(ctx context.Context) (*anytype.SpaceResponse, error)
func (*SpaceContextImpl) List ¶
func (sc *SpaceContextImpl) List(listID string) anytype.ListContext
func (*SpaceContextImpl) Member ¶
func (sc *SpaceContextImpl) Member(memberID string) anytype.MemberContext
func (*SpaceContextImpl) Members ¶
func (sc *SpaceContextImpl) Members() anytype.MemberClient
func (*SpaceContextImpl) Object ¶
func (sc *SpaceContextImpl) Object(objectID string) anytype.ObjectContext
func (*SpaceContextImpl) Objects ¶
func (sc *SpaceContextImpl) Objects() anytype.ObjectClient
func (*SpaceContextImpl) Properties ¶ added in v0.53.1
func (sc *SpaceContextImpl) Properties() anytype.SpacePropertyClient
func (*SpaceContextImpl) Property ¶ added in v0.53.1
func (sc *SpaceContextImpl) Property(propertyID string) anytype.PropertyContext
func (*SpaceContextImpl) Search ¶
func (sc *SpaceContextImpl) Search(ctx context.Context, request anytype.SearchRequest) (*anytype.SearchResponse, error)
func (*SpaceContextImpl) Type ¶
func (sc *SpaceContextImpl) Type(typeID string) anytype.TypeContext
func (*SpaceContextImpl) Types ¶
func (sc *SpaceContextImpl) Types() anytype.TypeClient
func (*SpaceContextImpl) Update ¶ added in v0.53.1
func (sc *SpaceContextImpl) Update(ctx context.Context, request anytype.UpdateSpaceRequest) (*anytype.SpaceResponse, error)
type SpacePropertyClientImpl ¶ added in v0.53.1
type SpacePropertyClientImpl struct {
// contains filtered or unexported fields
}
func (*SpacePropertyClientImpl) Create ¶ added in v0.53.1
func (pc *SpacePropertyClientImpl) Create(ctx context.Context, request anytype.CreatePropertyRequest) (*anytype.PropertyResponse, error)
type TagClientImpl ¶ added in v0.53.1
type TagClientImpl struct {
// contains filtered or unexported fields
}
func (*TagClientImpl) Create ¶ added in v0.53.1
func (tc *TagClientImpl) Create(ctx context.Context, request anytype.CreateTagRequest) (*anytype.TagResponse, error)
type TagContextImpl ¶ added in v0.53.1
type TagContextImpl struct {
// contains filtered or unexported fields
}
func (*TagContextImpl) Delete ¶ added in v0.53.1
func (tc *TagContextImpl) Delete(ctx context.Context) (*anytype.TagResponse, error)
func (*TagContextImpl) Get ¶ added in v0.53.1
func (tc *TagContextImpl) Get(ctx context.Context) (*anytype.TagResponse, error)
func (*TagContextImpl) Update ¶ added in v0.53.1
func (tc *TagContextImpl) Update(ctx context.Context, request anytype.UpdateTagRequest) (*anytype.TagResponse, error)
type TemplateClientImpl ¶
type TemplateClientImpl struct {
// contains filtered or unexported fields
}
type TemplateContextImpl ¶
type TemplateContextImpl struct {
// contains filtered or unexported fields
}
func (*TemplateContextImpl) Get ¶
func (tc *TemplateContextImpl) Get(ctx context.Context) (*anytype.TemplateResponse, error)
type TypeClientImpl ¶
type TypeClientImpl struct {
// contains filtered or unexported fields
}
func (*TypeClientImpl) Create ¶ added in v0.3.4
func (tc *TypeClientImpl) Create(ctx context.Context, request anytype.CreateTypeRequest) (*anytype.TypeResponse, error)
func (*TypeClientImpl) GetKeyByName ¶
GetKeyByName looks up a type key by its name
type TypeContextImpl ¶
type TypeContextImpl struct {
// contains filtered or unexported fields
}
func (*TypeContextImpl) Delete ¶ added in v0.53.1
func (tc *TypeContextImpl) Delete(ctx context.Context) (*anytype.TypeResponse, error)
func (*TypeContextImpl) Get ¶
func (tc *TypeContextImpl) Get(ctx context.Context) (*anytype.TypeResponse, error)
func (*TypeContextImpl) Template ¶
func (tc *TypeContextImpl) Template(templateID string) anytype.TemplateContext
func (*TypeContextImpl) Templates ¶
func (tc *TypeContextImpl) Templates() anytype.TemplateClient
func (*TypeContextImpl) Update ¶ added in v0.53.1
func (tc *TypeContextImpl) Update(ctx context.Context, request anytype.UpdateTypeRequest) (*anytype.TypeResponse, error)
type ViewClientImpl ¶
type ViewClientImpl struct {
// contains filtered or unexported fields
}
func (*ViewClientImpl) List ¶
func (vc *ViewClientImpl) List(ctx context.Context) (*anytype.ViewListResponse, error)
type ViewContextImpl ¶
type ViewContextImpl struct {
// contains filtered or unexported fields
}
func (*ViewContextImpl) Objects ¶
func (vc *ViewContextImpl) Objects() anytype.ObjectViewClient
Click to show internal directories.
Click to hide internal directories.