Versions in this module Expand all Collapse all v0 v0.0.1 Mar 28, 2021 Changes in this version + func CreateTLSConfig(certFile, keyFile, caCertFile string, tls1011 bool) (*tls.Config, error) + func NewHttpService(core Service) *httpService + type AddPoliciesRequest struct + NS string + PType string + Rules [][]string + Sec string + type ClearPolicyRequest struct + NS string + type CreateNameSpaceRequest struct + NS string + type EnforceReply struct + Ok bool + type EnforceRequest struct + Freshness int64 + Level int32 + NS string + Params []interface{} + type JoinRequest struct + Addr string + ID string + Metadata map[string]string + Voter bool + type RemoveFilteredPolicyRequest struct + FieldIndex int32 + FieldValues []string + NS string + PType string + Sec string + type RemovePoliciesRequest struct + NS string + PType string + Rules [][]string + Sec string + type RemoveRequest struct + ID string + type Service interface + AddPolicies func(ctx context.Context, ns string, sec string, pType string, rules [][]string) error + ClearPolicy func(ctx context.Context, ns string) error + CreateNamespace func(ctx context.Context, ns string) error + Enforce func(ctx context.Context, ns string, level int32, freshness int64, ...) (bool, error) + Join func(ctx context.Context, id, addr string, voter bool, metadata map[string]string) error + Remove func(ctx context.Context, id string) error + RemoveFilteredPolicy func(ctx context.Context, ns string, sec string, pType string, fi int32, ...) error + RemovePolicies func(ctx context.Context, ns string, sec string, pType string, rules [][]string) error + SetModelFromString func(ctx context.Context, ns string, text string) error + Stats func(ctx context.Context) (map[string]interface{}, error) + UpdatePolicies func(ctx context.Context, ns string, sec string, pType string, nr, or [][]string) error + UpdatePolicy func(ctx context.Context, ns string, sec string, pType string, nr, or []string) error + func New(store *store.Store) Service + type SetModelFromStringRequest struct + NS string + Text string + type UpdatePoliciesRequest struct + NS string + NewRules [][]string + OldRules [][]string + PType string + Sec string + type UpdatePolicyRequest struct + NS string + NewRule []string + OldRule []string + PType string + Sec string