Versions in this module Expand all Collapse all v1 v1.0.0 Jun 4, 2021 Changes in this version + var HostErrorFormat = fmt.Errorf(`should in format [<group>]\n<hostname> ansible_host=<ip>`) + var HostErrorNoHostname = fmt.Errorf("no hostname") + var HostErrorNoIp = fmt.Errorf("no ip address") + var HostErrorNoRole = fmt.Errorf("no group") + var HostErrorNotSame = fmt.Errorf("hostname not same with inventory file name") + var HostErrorReserved = fmt.Errorf("hostname reservced") + var HostnameReserved = pkgs.Strings([]string{ ... }) + var KeyErrorNoName = fmt.Errorf("no name specified") + var State_name = map[int32]string + var State_value = map[string]int32 + func AppendTarget(w tables.Table, target *Target) + func Commands(getContext func() context.Context, getClientConn func() *grpc.ClientConn) (commands []*cobra.Command) + func DisplayTarget(target *Target) + func FindGroups(target string) (groups []string) + func LoadHostnames(target string) (hostnames []string) + func NewTargetTable() tables.Table + func Register(s *grpc.Server) + func RegisterTargetAdminServer(s *grpc.Server, srv TargetAdminServer) + type CreateRequest struct + Name string + Release *releases.Release + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CreateRequest) Descriptor() ([]byte, []int) + func (*CreateRequest) ProtoMessage() + func (m *CreateRequest) GetName() string + func (m *CreateRequest) GetRelease() *releases.Release + func (m *CreateRequest) Reset() + func (m *CreateRequest) String() string + func (m *CreateRequest) XXX_DiscardUnknown() + func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateRequest) XXX_Merge(src proto.Message) + func (m *CreateRequest) XXX_Size() int + func (m *CreateRequest) XXX_Unmarshal(b []byte) error + type DeleteRequest struct + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeleteRequest) Descriptor() ([]byte, []int) + func (*DeleteRequest) ProtoMessage() + func (m *DeleteRequest) GetName() string + func (m *DeleteRequest) Reset() + func (m *DeleteRequest) String() string + func (m *DeleteRequest) XXX_DiscardUnknown() + func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeleteRequest) XXX_Merge(src proto.Message) + func (m *DeleteRequest) XXX_Size() int + func (m *DeleteRequest) XXX_Unmarshal(b []byte) error + type DeployRequest struct + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeployRequest) Descriptor() ([]byte, []int) + func (*DeployRequest) ProtoMessage() + func (m *DeployRequest) GetName() string + func (m *DeployRequest) Reset() + func (m *DeployRequest) String() string + func (m *DeployRequest) XXX_DiscardUnknown() + func (m *DeployRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeployRequest) XXX_Merge(src proto.Message) + func (m *DeployRequest) XXX_Size() int + func (m *DeployRequest) XXX_Unmarshal(b []byte) error + type Env struct + Name string + Value string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Env) Descriptor() ([]byte, []int) + func (*Env) ProtoMessage() + func (m *Env) GetName() string + func (m *Env) GetValue() string + func (m *Env) Reset() + func (m *Env) String() string + func (m *Env) XXX_DiscardUnknown() + func (m *Env) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Env) XXX_Merge(src proto.Message) + func (m *Env) XXX_Size() int + func (m *Env) XXX_Unmarshal(b []byte) error + type EnvsRequest struct + Env *Env + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*EnvsRequest) Descriptor() ([]byte, []int) + func (*EnvsRequest) ProtoMessage() + func (m *EnvsRequest) GetEnv() *Env + func (m *EnvsRequest) GetName() string + func (m *EnvsRequest) Reset() + func (m *EnvsRequest) String() string + func (m *EnvsRequest) XXX_DiscardUnknown() + func (m *EnvsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *EnvsRequest) XXX_Merge(src proto.Message) + func (m *EnvsRequest) XXX_Size() int + func (m *EnvsRequest) XXX_Unmarshal(b []byte) error + type GetRequest struct + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*GetRequest) Descriptor() ([]byte, []int) + func (*GetRequest) ProtoMessage() + func (m *GetRequest) GetName() string + func (m *GetRequest) Reset() + func (m *GetRequest) String() string + func (m *GetRequest) XXX_DiscardUnknown() + func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GetRequest) XXX_Merge(src proto.Message) + func (m *GetRequest) XXX_Size() int + func (m *GetRequest) XXX_Unmarshal(b []byte) error + type Host struct + Group string + Ip string + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Host) Descriptor() ([]byte, []int) + func (*Host) ProtoMessage() + func (host *Host) Load(target string, name string) (err error) + func (host *Host) Save(target string) (err error) + func (m *Host) GetGroup() string + func (m *Host) GetIp() string + func (m *Host) GetName() string + func (m *Host) Reset() + func (m *Host) String() string + func (m *Host) XXX_DiscardUnknown() + func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Host) XXX_Merge(src proto.Message) + func (m *Host) XXX_Size() int + func (m *Host) XXX_Unmarshal(b []byte) error + type HostsRequest struct + Host *Host + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*HostsRequest) Descriptor() ([]byte, []int) + func (*HostsRequest) ProtoMessage() + func (m *HostsRequest) GetHost() *Host + func (m *HostsRequest) GetName() string + func (m *HostsRequest) Reset() + func (m *HostsRequest) String() string + func (m *HostsRequest) XXX_DiscardUnknown() + func (m *HostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *HostsRequest) XXX_Merge(src proto.Message) + func (m *HostsRequest) XXX_Size() int + func (m *HostsRequest) XXX_Unmarshal(b []byte) error + type Key struct + Name string + Private string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Key) Descriptor() ([]byte, []int) + func (*Key) ProtoMessage() + func (key *Key) Load(target, name string) (err error) + func (key *Key) Remove(target string) (err error) + func (key *Key) Save(target string) (err error) + func (m *Key) GetName() string + func (m *Key) GetPrivate() string + func (m *Key) Reset() + func (m *Key) String() string + func (m *Key) XXX_DiscardUnknown() + func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Key) XXX_Merge(src proto.Message) + func (m *Key) XXX_Size() int + func (m *Key) XXX_Unmarshal(b []byte) error + type KeysRequest struct + Key *Key + Name string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*KeysRequest) Descriptor() ([]byte, []int) + func (*KeysRequest) ProtoMessage() + func (m *KeysRequest) GetKey() *Key + func (m *KeysRequest) GetName() string + func (m *KeysRequest) Reset() + func (m *KeysRequest) String() string + func (m *KeysRequest) XXX_DiscardUnknown() + func (m *KeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeysRequest) XXX_Merge(src proto.Message) + func (m *KeysRequest) XXX_Size() int + func (m *KeysRequest) XXX_Unmarshal(b []byte) error + type ListRequest struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ListRequest) Descriptor() ([]byte, []int) + func (*ListRequest) ProtoMessage() + func (m *ListRequest) Reset() + func (m *ListRequest) String() string + func (m *ListRequest) XXX_DiscardUnknown() + func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ListRequest) XXX_Merge(src proto.Message) + func (m *ListRequest) XXX_Size() int + func (m *ListRequest) XXX_Unmarshal(b []byte) error + type State int32 + const State_CREATED + const State_DELETED + const State_DEPLOYED + const State_MAINTAINENCE + const State_RUNNING + const State_UPDATED + func (State) EnumDescriptor() ([]byte, []int) + func (x State) String() string + type Target struct + Hosts []*Host + Name string + Release *releases.Release + State State + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Target) Descriptor() ([]byte, []int) + func (*Target) ProtoMessage() + func (m *Target) GetHosts() []*Host + func (m *Target) GetName() string + func (m *Target) GetRelease() *releases.Release + func (m *Target) GetState() State + func (m *Target) Reset() + func (m *Target) String() string + func (m *Target) XXX_DiscardUnknown() + func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Target) XXX_Merge(src proto.Message) + func (m *Target) XXX_Size() int + func (m *Target) XXX_Unmarshal(b []byte) error + type TargetAdminClient interface + Create func(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*Target, error) + Delete func(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Target, error) + Deploy func(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*Target, error) + Envs func(ctx context.Context, in *EnvsRequest, opts ...grpc.CallOption) (TargetAdmin_EnvsClient, error) + Get func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Target, error) + Hosts func(ctx context.Context, in *HostsRequest, opts ...grpc.CallOption) (TargetAdmin_HostsClient, error) + Keys func(ctx context.Context, in *KeysRequest, opts ...grpc.CallOption) (TargetAdmin_KeysClient, error) + List func(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TargetAdmin_ListClient, error) + Update func(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Target, error) + func NewTargetAdminClient(cc *grpc.ClientConn) TargetAdminClient + type TargetAdminServer interface + Create func(context.Context, *CreateRequest) (*Target, error) + Delete func(context.Context, *DeleteRequest) (*Target, error) + Deploy func(context.Context, *DeployRequest) (*Target, error) + Envs func(*EnvsRequest, TargetAdmin_EnvsServer) error + Get func(context.Context, *GetRequest) (*Target, error) + Hosts func(*HostsRequest, TargetAdmin_HostsServer) error + Keys func(*KeysRequest, TargetAdmin_KeysServer) error + List func(*ListRequest, TargetAdmin_ListServer) error + Update func(context.Context, *UpdateRequest) (*Target, error) + type TargetAdmin_EnvsClient interface + Recv func() (*Env, error) + type TargetAdmin_EnvsServer interface + Send func(*Env) error + type TargetAdmin_HostsClient interface + Recv func() (*Host, error) + type TargetAdmin_HostsServer interface + Send func(*Host) error + type TargetAdmin_KeysClient interface + Recv func() (*Key, error) + type TargetAdmin_KeysServer interface + Send func(*Key) error + type TargetAdmin_ListClient interface + Recv func() (*Target, error) + type TargetAdmin_ListServer interface + Send func(*Target) error + type UnimplementedTargetAdminServer struct + func (*UnimplementedTargetAdminServer) Create(ctx context.Context, req *CreateRequest) (*Target, error) + func (*UnimplementedTargetAdminServer) Delete(ctx context.Context, req *DeleteRequest) (*Target, error) + func (*UnimplementedTargetAdminServer) Deploy(ctx context.Context, req *DeployRequest) (*Target, error) + func (*UnimplementedTargetAdminServer) Envs(req *EnvsRequest, srv TargetAdmin_EnvsServer) error + func (*UnimplementedTargetAdminServer) Get(ctx context.Context, req *GetRequest) (*Target, error) + func (*UnimplementedTargetAdminServer) Hosts(req *HostsRequest, srv TargetAdmin_HostsServer) error + func (*UnimplementedTargetAdminServer) Keys(req *KeysRequest, srv TargetAdmin_KeysServer) error + func (*UnimplementedTargetAdminServer) List(req *ListRequest, srv TargetAdmin_ListServer) error + func (*UnimplementedTargetAdminServer) Update(ctx context.Context, req *UpdateRequest) (*Target, error) + type UpdateRequest struct + Name string + Version string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UpdateRequest) Descriptor() ([]byte, []int) + func (*UpdateRequest) ProtoMessage() + func (m *UpdateRequest) GetName() string + func (m *UpdateRequest) GetVersion() string + func (m *UpdateRequest) Reset() + func (m *UpdateRequest) String() string + func (m *UpdateRequest) XXX_DiscardUnknown() + func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UpdateRequest) XXX_Merge(src proto.Message) + func (m *UpdateRequest) XXX_Size() int + func (m *UpdateRequest) XXX_Unmarshal(b []byte) error