Documentation
¶
Index ¶
- func CreateTLSConfig(certFile, keyFile, caCertFile string, tls1011 bool) (*tls.Config, error)
- func NewHttpService(core Service) *httpService
- type AddPoliciesRequest
- type ClearPolicyRequest
- type CreateNameSpaceRequest
- type EnforceReply
- type EnforceRequest
- type JoinRequest
- type RemoveFilteredPolicyRequest
- type RemovePoliciesRequest
- type RemoveRequest
- type Service
- type SetModelFromStringRequest
- type UpdatePoliciesRequest
- type UpdatePolicyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTLSConfig ¶
CreateTLSConfig returns a TLS config from the given cert and key.
func NewHttpService ¶
func NewHttpService(core Service) *httpService
Types ¶
type AddPoliciesRequest ¶
type ClearPolicyRequest ¶
type ClearPolicyRequest struct {
NS string `json:"ns" validate:"required"`
}
type CreateNameSpaceRequest ¶
type CreateNameSpaceRequest struct {
NS string `json:"ns" validate:"required"`
}
type EnforceReply ¶
type EnforceReply struct {
Ok bool `json:"ok"`
}
type EnforceRequest ¶
type JoinRequest ¶
type RemovePoliciesRequest ¶
type RemoveRequest ¶
type RemoveRequest struct {
ID string `json:"id" validate:"required"`
}
type Service ¶
type Service interface { Stats(ctx context.Context) (map[string]interface{}, error) CreateNamespace(ctx context.Context, ns string) error SetModelFromString(ctx context.Context, ns string, text string) error Enforce(ctx context.Context, ns string, level int32, freshness int64, params ...interface{}) (bool, error) AddPolicies(ctx context.Context, ns string, sec string, pType string, rules [][]string) error RemovePolicies(ctx context.Context, ns string, sec string, pType string, rules [][]string) error RemoveFilteredPolicy(ctx context.Context, ns string, sec string, pType string, fi int32, fv []string) error UpdatePolicy(ctx context.Context, ns string, sec string, pType string, nr, or []string) error UpdatePolicies(ctx context.Context, ns string, sec string, pType string, nr, or [][]string) error ClearPolicy(ctx context.Context, ns string) error Join(ctx context.Context, id, addr string, voter bool, metadata map[string]string) error Remove(ctx context.Context, id string) error }
type UpdatePoliciesRequest ¶
type UpdatePolicyRequest ¶
Click to show internal directories.
Click to hide internal directories.