Documentation ¶
Index ¶
- type ConnectionBuilder
- func (b *ConnectionBuilder) AsAgent(agent string) *ConnectionBuilder
- func (b *ConnectionBuilder) Build() (result *sdk.Connection, err error)
- func (b *ConnectionBuilder) Config(value *config.Config) *ConnectionBuilder
- func (b *ConnectionBuilder) WithApiUrl(url string) *ConnectionBuilder
- func (b *ConnectionBuilder) WithLogger(logger logging.Logger) *ConnectionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionBuilder ¶
type ConnectionBuilder struct {
// contains filtered or unexported fields
}
ConnectionBuilder contains the information and logic needed to build a connection to OCM. Don't create instances of this type directly; use the NewConnection function instead.
func NewConnection ¶
func NewConnection() *ConnectionBuilder
NewConnection creates a builder that can then be used to configure and build an OCM connection. Don't create instances of this type directly; use the NewConnection function instead.
func (*ConnectionBuilder) AsAgent ¶
func (b *ConnectionBuilder) AsAgent(agent string) *ConnectionBuilder
Override the default UserAgent String
func (*ConnectionBuilder) Build ¶
func (b *ConnectionBuilder) Build() (result *sdk.Connection, err error)
Build uses the information stored in the builder to create a new OCM connection.
func (*ConnectionBuilder) Config ¶
func (b *ConnectionBuilder) Config(value *config.Config) *ConnectionBuilder
Config sets the configuration that the connection will use to authenticate the user
func (*ConnectionBuilder) WithApiUrl ¶
func (b *ConnectionBuilder) WithApiUrl(url string) *ConnectionBuilder
Override the default API URL
func (*ConnectionBuilder) WithLogger ¶
func (b *ConnectionBuilder) WithLogger(logger logging.Logger) *ConnectionBuilder
Override the default logging implementation