Documentation ¶
Index ¶
- type SatoriClient
- func (s *SatoriClient) Authenticate(ctx context.Context, id string, ...) error
- func (s *SatoriClient) EventsPublish(ctx context.Context, id string, events []*runtime.Event) error
- func (s *SatoriClient) ExperimentsList(ctx context.Context, id string, names ...string) (*runtime.ExperimentList, error)
- func (s *SatoriClient) FlagsList(ctx context.Context, id string, names ...string) (*runtime.FlagList, error)
- func (s *SatoriClient) LiveEventsList(ctx context.Context, id string, names ...string) (*runtime.LiveEventList, error)
- func (s *SatoriClient) MessageDelete(ctx context.Context, id, messageId string) error
- func (s *SatoriClient) MessageUpdate(ctx context.Context, id, messageId string, readTime, consumeTime int64) error
- func (s *SatoriClient) MessagesList(ctx context.Context, id string, limit int, forward bool, cursor string) (*runtime.MessageList, error)
- func (s *SatoriClient) PropertiesGet(ctx context.Context, id string) (*runtime.Properties, error)
- func (s *SatoriClient) PropertiesUpdate(ctx context.Context, id string, properties *runtime.PropertiesUpdate) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SatoriClient ¶
type SatoriClient struct {
// contains filtered or unexported fields
}
func NewSatoriClient ¶
func NewSatoriClient(logger *zap.Logger, satoriUrl, apiKeyName, apiKey, signingKey string, nakamaTokenExpirySec int64) *SatoriClient
func (*SatoriClient) Authenticate ¶
func (s *SatoriClient) Authenticate(ctx context.Context, id string, defaultProperties, customProperties map[string]string, ipAddress ...string) error
@group satori @summary Create a new identity. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param default(type=map[string]string, optional=true, default=nil) Default properties to update with this call. Set to nil to leave them as they are on the server. @param custom(type=map[string]string, optional=true, default=nil) Custom properties to update with this call. Set to nil to leave them as they are on the server. @param ipAddress(type=string, optional=true, default="") An optional client IP address to pass on to Satori for geo-IP lookup. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) EventsPublish ¶
@group satori @summary Publish an event. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param events(type=[]*runtime.Event) An array of events to publish. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) ExperimentsList ¶
func (s *SatoriClient) ExperimentsList(ctx context.Context, id string, names ...string) (*runtime.ExperimentList, error)
@group satori @summary List experiments. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param names(type=[]string, optional=true, default=[]) Optional list of experiment names to filter. @return experiments(*runtime.ExperimentList) The experiment list. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) FlagsList ¶
func (s *SatoriClient) FlagsList(ctx context.Context, id string, names ...string) (*runtime.FlagList, error)
@group satori @summary List flags. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param names(type=[]string, optional=true, default=[]) Optional list of flag names to filter. @return flags(*runtime.FlagList) The flag list. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) LiveEventsList ¶
func (s *SatoriClient) LiveEventsList(ctx context.Context, id string, names ...string) (*runtime.LiveEventList, error)
@group satori @summary List live events. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param names(type=[]string, optional=true, default=[]) Optional list of live event names to filter. @return liveEvents(*runtime.LiveEventsList) The live event list. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) MessageDelete ¶ added in v3.24.1
func (s *SatoriClient) MessageDelete(ctx context.Context, id, messageId string) error
@group satori @summary Delete message. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param messageId(type=string) The identifier of the message. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) MessageUpdate ¶ added in v3.24.1
func (s *SatoriClient) MessageUpdate(ctx context.Context, id, messageId string, readTime, consumeTime int64) error
@group satori @summary Update message. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param readTime(type=int64) The time the message was read at the client. @param consumeTime(type=int64) The time the message was consumed by the identity. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) MessagesList ¶ added in v3.24.1
func (s *SatoriClient) MessagesList(ctx context.Context, id string, limit int, forward bool, cursor string) (*runtime.MessageList, error)
@group satori @summary List messages. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param limit(type=int) The max number of messages to return. @param forward(type=bool) True if listing should be older messages to newer, false if reverse. @param cursor(type=string) A pagination cursor, if any. @return messages(*runtime.MessageList) The messages list. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) PropertiesGet ¶
func (s *SatoriClient) PropertiesGet(ctx context.Context, id string) (*runtime.Properties, error)
@group satori @summary Get identity properties. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @return properties(*runtime.Properties) The identity properties. @return error(error) An optional error value if an error occurred.
func (*SatoriClient) PropertiesUpdate ¶
func (s *SatoriClient) PropertiesUpdate(ctx context.Context, id string, properties *runtime.PropertiesUpdate) error
@group satori @summary Update identity properties. @param ctx(type=context.Context) The context object represents information about the server and requester. @param id(type=string) The identifier of the identity. @param properties(type=*runtime.PropertiesUpdate) The identity properties to update. @return error(error) An optional error value if an error occurred.