Documentation
¶
Index ¶
- type Api
- func (api *Api) AddNode(c *gin.Context)
- func (api *Api) Apply(c *gin.Context)
- func (api *Api) ClusterCheck() gin.HandlerFunc
- func (api *Api) Compare(c *gin.Context)
- func (api *Api) CreateUser(c *gin.Context)
- func (api *Api) DatabaseGet(c *gin.Context)
- func (api *Api) DatabaseGetKeys(c *gin.Context)
- func (api *Api) DatabaseGetKeysPrefix(c *gin.Context)
- func (api *Api) DatabaseRemoveKeys(c *gin.Context)
- func (api *Api) DatabaseSet(c *gin.Context)
- func (api *Api) Debug(c *gin.Context)
- func (api *Api) Delete(c *gin.Context)
- func (api *Api) ExportClients(c *gin.Context)
- func (api *Api) GetCluster(c *gin.Context)
- func (api *Api) HandleDns(w mdns.ResponseWriter, m *mdns.Msg)
- func (api *Api) Health(c *gin.Context)
- func (api *Api) ImplementationWrapperApply(user *authentication.User, kind string, jsonData []byte, c *gin.Context)
- func (api *Api) ImplementationWrapperCompare(user *authentication.User, kind string, jsonData []byte, c *gin.Context)
- func (api *Api) ImplementationWrapperDelete(user *authentication.User, kind string, jsonData []byte, c *gin.Context)
- func (api *Api) ImplementationWrapperPropose(user *authentication.User, kind string, jsonData []byte, c *gin.Context)
- func (api *Api) ListSupported(c *gin.Context)
- func (api *Api) ListenNode()
- func (api *Api) Logs(c *gin.Context)
- func (api *Api) Metrics() gin.HandlerFunc
- func (api *Api) ProposeDatabase(c *gin.Context)
- func (api *Api) ProposeObject(c *gin.Context)
- func (api *Api) ProposeSecrets(c *gin.Context)
- func (api *Api) Ps(c *gin.Context)
- func (api *Api) RemoveNode(c *gin.Context)
- func (api *Api) RunControl(c *gin.Context)
- func (api *Api) SaveClusterConfiguration()
- func (api *Api) SecretsGet(c *gin.Context)
- func (api *Api) SecretsGetKeys(c *gin.Context)
- func (api *Api) SecretsGetKeysPrefix(c *gin.Context)
- func (api *Api) SecretsRemoveKeys(c *gin.Context)
- func (api *Api) SecretsSet(c *gin.Context)
- func (api *Api) SetupCluster(TLSConfig *tls.Config, nodeID uint64, cluster *cluster.Cluster, join string) error
- func (api *Api) SetupEtcd()
- func (api *Api) StartCluster(c *gin.Context)
- func (api *Api) Version(c *gin.Context)
- type Kv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
Server *embed.Etcd
Etcd *clientv3.Client
User *authentication.User
Config *configuration.Configuration
Keys *keys.Keys
DnsCache *dns.Records
Cluster *cluster.Cluster
Replication *distributed.Replication
Kinds *relations.RelationRegistry
KindsRegistry map[string]contracts.Kind
Manager *manager.Manager
VersionServer string
// contains filtered or unexported fields
}
func NewApi ¶
func NewApi(config *configuration.Configuration) *Api
func (*Api) ClusterCheck ¶ added in v0.0.85
func (api *Api) ClusterCheck() gin.HandlerFunc
func (*Api) CreateUser ¶ added in v0.0.10
func (*Api) DatabaseGet ¶
DatabaseGet godoc
@Summary Get value from the key-value store
@Description get string by key from the key-value store
@Tags database
@Produce json
@Param key path string true "RandomKey"
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key} [get]
func (*Api) DatabaseGetKeys ¶
DatabaseGetKeys godoc
@Summary Get keys by prefix in the key-value store
@Description get all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/keys [get]
func (*Api) DatabaseGetKeysPrefix ¶
DatabaseGetKeysPrefix godoc
@Summary Get keys by prefix in the key-value store
@Description get all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key}/{prefix} [get]
func (*Api) DatabaseRemoveKeys ¶
DatabaseRemoveKeys godoc
@Summary Remove keys by prefix in the key-value store
@Description remove all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/keys [delete]
func (*Api) DatabaseSet ¶
DatabaseSet godoc
@Summary Set value in the key-value store
@Description set string by key in the key-value store
@Tags database
@Accepts json
@Produce json
@Param key path string true "RandomKey"
@Param value body Kv true "value"
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key} [post]
func (*Api) ExportClients ¶ added in v0.0.116
func (*Api) GetCluster ¶ added in v0.0.57
func (*Api) ImplementationWrapperApply ¶
func (*Api) ImplementationWrapperCompare ¶
func (*Api) ImplementationWrapperDelete ¶
func (*Api) ImplementationWrapperPropose ¶ added in v0.0.114
func (*Api) ListSupported ¶
func (*Api) ListenNode ¶ added in v0.0.128
func (api *Api) ListenNode()
func (*Api) Metrics ¶ added in v0.0.85
func (api *Api) Metrics() gin.HandlerFunc
func (*Api) ProposeDatabase ¶ added in v0.0.114
func (*Api) ProposeObject ¶ added in v0.0.117
func (*Api) ProposeSecrets ¶ added in v0.0.117
func (*Api) RemoveNode ¶ added in v0.0.57
func (*Api) RunControl ¶ added in v0.0.73
func (*Api) SaveClusterConfiguration ¶ added in v0.0.57
func (api *Api) SaveClusterConfiguration()
func (*Api) SecretsGet ¶
SecretsGet godoc
@Summary Get value from the key-value store
@Description get string by key from the key-value store
@Tags database
@Produce json
@Param key path string true "RandomKey"
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key} [get]
func (*Api) SecretsGetKeys ¶
SecretsGetKeys godoc
@Summary Get keys by prefix in the key-value store
@Description get all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/keys [get]
func (*Api) SecretsGetKeysPrefix ¶ added in v0.0.117
SecretsGetKeysPrefix godoc
@Summary Get keys by prefix in the key-value store
@Description get all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key}/{prefix} [get]
func (*Api) SecretsRemoveKeys ¶ added in v0.0.117
SecretsRemoveKeys godoc
@Summary Remove keys by prefix in the key-value store
@Description remove all keys by prefix in the key-value store
@Tags database
@Produce json
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/keys [delete]
func (*Api) SecretsSet ¶
SecretsSet godoc
@Summary Set value in the key-value store
@Description set string by key in the key-value store
@Tags database
@Accepts json
@Produce json
@Param key path string true "RandomKey"
@Param value body Kv true "value"
@Success 200 {object} contracts.Response
@Failure 400 {object} contracts.Response
@Failure 404 {object} contracts.Response
@Failure 500 {object} contracts.Response
@Router /database/{key} [post]
func (*Api) SetupCluster ¶ added in v0.0.129
func (*Api) StartCluster ¶ added in v0.0.57
Click to show internal directories.
Click to hide internal directories.